From ecbdceb407af97001d2bae2b9603db6083d397ba Mon Sep 17 00:00:00 2001 From: Darshan Date: Tue, 30 Dec 2025 18:52:53 +0530 Subject: [PATCH] add: admin scopes for console sdk. --- .../Modules/Databases/Http/DocumentsDB/Collections/Create.php | 2 +- .../Modules/Databases/Http/DocumentsDB/Collections/Delete.php | 2 +- .../Modules/Databases/Http/DocumentsDB/Collections/Get.php | 2 +- .../Databases/Http/DocumentsDB/Collections/Indexes/Create.php | 2 +- .../Databases/Http/DocumentsDB/Collections/Indexes/Delete.php | 2 +- .../Databases/Http/DocumentsDB/Collections/Indexes/Get.php | 2 +- .../Databases/Http/DocumentsDB/Collections/Indexes/XList.php | 2 +- .../Modules/Databases/Http/DocumentsDB/Collections/Update.php | 2 +- .../Modules/Databases/Http/DocumentsDB/Collections/XList.php | 2 +- .../Platform/Modules/Databases/Http/DocumentsDB/Create.php | 2 +- .../Platform/Modules/Databases/Http/DocumentsDB/Delete.php | 2 +- .../Platform/Modules/Databases/Http/DocumentsDB/Get.php | 2 +- .../Platform/Modules/Databases/Http/DocumentsDB/Update.php | 2 +- .../Platform/Modules/Databases/Http/DocumentsDB/XList.php | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/DocumentsDB/Collections/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/DocumentsDB/Collections/Create.php index a2d4321bee..0908830ed8 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/DocumentsDB/Collections/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/DocumentsDB/Collections/Create.php @@ -46,7 +46,7 @@ class Create extends CollectionCreate group: 'collections', name: 'createCollection', description: '/docs/references/documentsdb/create-collection.md', - auth: [AuthType::KEY], + auth: [AuthType::ADMIN, AuthType::KEY], responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_CREATED, diff --git a/src/Appwrite/Platform/Modules/Databases/Http/DocumentsDB/Collections/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/DocumentsDB/Collections/Delete.php index 16ad2b376c..9e0d9b79ed 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/DocumentsDB/Collections/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/DocumentsDB/Collections/Delete.php @@ -40,7 +40,7 @@ class Delete extends CollectionDelete group: 'collections', name: 'deleteCollection', description: '/docs/references/documentsdb/delete-collection.md', - auth: [AuthType::KEY], + auth: [AuthType::ADMIN, AuthType::KEY], responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_NOCONTENT, diff --git a/src/Appwrite/Platform/Modules/Databases/Http/DocumentsDB/Collections/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/DocumentsDB/Collections/Get.php index f5d1d91164..4db67e604c 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/DocumentsDB/Collections/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/DocumentsDB/Collections/Get.php @@ -37,7 +37,7 @@ class Get extends CollectionGet group: 'collections', name: 'getCollection', description: '/docs/references/documentsdb/get-collection.md', - auth: [AuthType::KEY], + auth: [AuthType::ADMIN, AuthType::KEY], responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_OK, diff --git a/src/Appwrite/Platform/Modules/Databases/Http/DocumentsDB/Collections/Indexes/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/DocumentsDB/Collections/Indexes/Create.php index 09ec5abca1..a50b29e676 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/DocumentsDB/Collections/Indexes/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/DocumentsDB/Collections/Indexes/Create.php @@ -46,7 +46,7 @@ class Create extends IndexCreate group: $this->getSdkGroup(), name: 'createIndex', description: '/docs/references/documentsdb/create-index.md', - auth: [AuthType::KEY], + auth: [AuthType::ADMIN, AuthType::KEY], responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_ACCEPTED, diff --git a/src/Appwrite/Platform/Modules/Databases/Http/DocumentsDB/Collections/Indexes/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/DocumentsDB/Collections/Indexes/Delete.php index 8746f29b99..f7d0ebfaae 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/DocumentsDB/Collections/Indexes/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/DocumentsDB/Collections/Indexes/Delete.php @@ -45,7 +45,7 @@ class Delete extends IndexDelete group: $this->getSdkGroup(), name: 'deleteIndex', // getName needs to be different from parent action to avoid conflict in path name description: '/docs/references/documentsdb/delete-index.md', - auth: [AuthType::KEY], + auth: [AuthType::ADMIN, AuthType::KEY], responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_NOCONTENT, diff --git a/src/Appwrite/Platform/Modules/Databases/Http/DocumentsDB/Collections/Indexes/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/DocumentsDB/Collections/Indexes/Get.php index ddb8612fb7..25ce8b0775 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/DocumentsDB/Collections/Indexes/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/DocumentsDB/Collections/Indexes/Get.php @@ -38,7 +38,7 @@ class Get extends IndexGet group: $this->getSdkGroup(), name: 'getIndex', // getName needs to be different from parent action to avoid conflict in path name description: '/docs/references/documentsdb/get-index.md', - auth: [AuthType::KEY], + auth: [AuthType::ADMIN, AuthType::KEY], responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_OK, diff --git a/src/Appwrite/Platform/Modules/Databases/Http/DocumentsDB/Collections/Indexes/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/DocumentsDB/Collections/Indexes/XList.php index b7a240a9a9..6b2d4ca49e 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/DocumentsDB/Collections/Indexes/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/DocumentsDB/Collections/Indexes/XList.php @@ -39,7 +39,7 @@ class XList extends IndexXList group: $this->getSdkGroup(), name: 'listIndexes', // getName needs to be different from parent action to avoid conflict in path name description: '/docs/references/documentsdb/list-indexes.md', - auth: [AuthType::KEY], + auth: [AuthType::ADMIN, AuthType::KEY], responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_OK, diff --git a/src/Appwrite/Platform/Modules/Databases/Http/DocumentsDB/Collections/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/DocumentsDB/Collections/Update.php index 86aad39943..71f96fdc76 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/DocumentsDB/Collections/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/DocumentsDB/Collections/Update.php @@ -43,7 +43,7 @@ class Update extends CollectionUpdate group: 'collections', name: 'updateCollection', description: '/docs/references/documentsdb/update-collection.md', - auth: [AuthType::KEY], + auth: [AuthType::ADMIN, AuthType::KEY], responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_OK, diff --git a/src/Appwrite/Platform/Modules/Databases/Http/DocumentsDB/Collections/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/DocumentsDB/Collections/XList.php index 13661654c3..f15a5205ef 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/DocumentsDB/Collections/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/DocumentsDB/Collections/XList.php @@ -40,7 +40,7 @@ class XList extends CollectionXList group: 'collections', name: 'listCollections', description: '/docs/references/documentsdb/list-collections.md', - auth: [AuthType::KEY], + auth: [AuthType::ADMIN, AuthType::KEY], responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_OK, diff --git a/src/Appwrite/Platform/Modules/Databases/Http/DocumentsDB/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/DocumentsDB/Create.php index 08715d253a..891bc476ca 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/DocumentsDB/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/DocumentsDB/Create.php @@ -37,7 +37,7 @@ class Create extends DatabaseCreate group: 'documentsdb', name: 'create', description: '/docs/references/documentsdb/create.md', - auth: [AuthType::KEY], + auth: [AuthType::ADMIN, AuthType::KEY], responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_CREATED, diff --git a/src/Appwrite/Platform/Modules/Databases/Http/DocumentsDB/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/DocumentsDB/Delete.php index 9b4a0d9838..9676338c0a 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/DocumentsDB/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/DocumentsDB/Delete.php @@ -35,7 +35,7 @@ class Delete extends DatabaseDelete group: 'documentsdb', name: 'delete', description: '/docs/references/documentsdb/delete.md', - auth: [AuthType::KEY], + auth: [AuthType::ADMIN, AuthType::KEY], responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_NOCONTENT, diff --git a/src/Appwrite/Platform/Modules/Databases/Http/DocumentsDB/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/DocumentsDB/Get.php index 1996971af4..d04780e98b 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/DocumentsDB/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/DocumentsDB/Get.php @@ -32,7 +32,7 @@ class Get extends DatabaseGet group: 'documentsdb', name: 'get', description: '/docs/references/documentsdb/get.md', - auth: [AuthType::KEY], + auth: [AuthType::ADMIN, AuthType::KEY], responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_OK, diff --git a/src/Appwrite/Platform/Modules/Databases/Http/DocumentsDB/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/DocumentsDB/Update.php index b51dfa6a93..774c708002 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/DocumentsDB/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/DocumentsDB/Update.php @@ -37,7 +37,7 @@ class Update extends DatabaseUpdate group: 'documentsdb', name: 'update', description: '/docs/references/documentsdb/update.md', - auth: [AuthType::KEY], + auth: [AuthType::ADMIN, AuthType::KEY], responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_OK, diff --git a/src/Appwrite/Platform/Modules/Databases/Http/DocumentsDB/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/DocumentsDB/XList.php index b0fdcec96a..3f3e32c6c2 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/DocumentsDB/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/DocumentsDB/XList.php @@ -34,7 +34,7 @@ class XList extends DatabaseXList group: 'documentsdb', name: 'list', description: '/docs/references/documentsdb/list.md', - auth: [AuthType::KEY], + auth: [AuthType::ADMIN, AuthType::KEY], responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_OK,