From e07f9a7b49d5497f30fd55ec07f9a225eda9db61 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Wed, 11 Feb 2026 14:04:14 +0530 Subject: [PATCH] added admin auth to vector db --- .../Modules/Databases/Http/VectorDB/Collections/Create.php | 2 +- .../Modules/Databases/Http/VectorDB/Collections/Delete.php | 2 +- .../Databases/Http/VectorDB/Collections/Documents/Create.php | 2 +- .../Databases/Http/VectorDB/Collections/Documents/Delete.php | 2 +- .../Databases/Http/VectorDB/Collections/Documents/Get.php | 2 +- .../Databases/Http/VectorDB/Collections/Documents/Update.php | 2 +- .../Databases/Http/VectorDB/Collections/Documents/Upsert.php | 2 +- .../Databases/Http/VectorDB/Collections/Documents/XList.php | 2 +- .../Modules/Databases/Http/VectorDB/Collections/Get.php | 2 +- .../Modules/Databases/Http/VectorDB/Collections/Update.php | 2 +- .../Modules/Databases/Http/VectorDB/Collections/XList.php | 2 +- .../Platform/Modules/Databases/Http/VectorDB/Create.php | 2 +- .../Platform/Modules/Databases/Http/VectorDB/Delete.php | 2 +- .../Modules/Databases/Http/VectorDB/Embeddings/Text/Create.php | 2 +- src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Get.php | 2 +- .../Modules/Databases/Http/VectorDB/Transactions/Create.php | 2 +- .../Modules/Databases/Http/VectorDB/Transactions/Delete.php | 2 +- .../Modules/Databases/Http/VectorDB/Transactions/Get.php | 2 +- .../Databases/Http/VectorDB/Transactions/Operations/Create.php | 2 +- .../Modules/Databases/Http/VectorDB/Transactions/Update.php | 2 +- .../Modules/Databases/Http/VectorDB/Transactions/XList.php | 2 +- .../Platform/Modules/Databases/Http/VectorDB/Update.php | 2 +- src/Appwrite/Platform/Modules/Databases/Http/VectorDB/XList.php | 2 +- 23 files changed, 23 insertions(+), 23 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Create.php index e621f95c99..3d0bf261e2 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Create.php @@ -57,7 +57,7 @@ class Create extends CollectionAction group: 'collections', name: 'createCollection', description: '/docs/references/vectordb/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/VectorDB/Collections/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Delete.php index 93e79ba7eb..7001d9d7f6 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Delete.php @@ -40,7 +40,7 @@ class Delete extends CollectionDelete group: 'collections', name: 'deleteCollection', description: '/docs/references/vectordb/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/VectorDB/Collections/Documents/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Documents/Create.php index 30a557c995..2dc5dc72fb 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Documents/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Documents/Create.php @@ -55,7 +55,7 @@ class Create extends DocumentCreate name: 'createDocument', desc: 'Create document', description: '/docs/references/vectordb/create-document.md', - auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], + auth: [AuthType::ADMIN, AuthType::SESSION, AuthType::KEY, AuthType::JWT], responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_CREATED, diff --git a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Documents/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Documents/Delete.php index ed8e2f6196..9635add9bb 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Documents/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Documents/Delete.php @@ -49,7 +49,7 @@ class Delete extends DocumentDelete group: $this->getSdkGroup(), name: 'deleteDocument', description: '/docs/references/vectordb/delete-document.md', - auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], + auth: [AuthType::ADMIN, AuthType::SESSION, AuthType::KEY, AuthType::JWT], responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_NOCONTENT, diff --git a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Documents/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Documents/Get.php index 0c26a5dd07..732c198db2 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Documents/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Documents/Get.php @@ -39,7 +39,7 @@ class Get extends DocumentGet group: $this->getSdkGroup(), name: 'getDocument', description: '/docs/references/vectordb/get-document.md', - auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], + auth: [AuthType::ADMIN, AuthType::SESSION, AuthType::KEY, AuthType::JWT], responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_OK, diff --git a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Documents/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Documents/Update.php index 459745cf4b..4f2edc1652 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Documents/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Documents/Update.php @@ -46,7 +46,7 @@ class Update extends DocumentUpdate group: $this->getSdkGroup(), name: 'updateDocument', description: '/docs/references/vectordb/update-document.md', - auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], + auth: [AuthType::ADMIN, AuthType::SESSION, AuthType::KEY, AuthType::JWT], responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_OK, diff --git a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Documents/Upsert.php b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Documents/Upsert.php index a17d6036a6..754dab8c2c 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Documents/Upsert.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Documents/Upsert.php @@ -48,7 +48,7 @@ class Upsert extends DocumentUpsert group: $this->getSdkGroup(), name: 'upsertDocument', description: '/docs/references/vectordb/upsert-document.md', - auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], + auth: [AuthType::ADMIN, AuthType::SESSION, AuthType::KEY, AuthType::JWT], responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_CREATED, diff --git a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Documents/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Documents/XList.php index 6f135cb904..cdc2cec23b 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Documents/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Documents/XList.php @@ -40,7 +40,7 @@ class XList extends DocumentXList group: $this->getSdkGroup(), name: 'listDocuments', description: '/docs/references/vectordb/list-documents.md', - auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], + auth: [AuthType::ADMIN, AuthType::SESSION, AuthType::KEY, AuthType::JWT], responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_OK, diff --git a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Get.php index a2bc629caa..2b0eca5aac 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Get.php @@ -37,7 +37,7 @@ class Get extends CollectionGet group: 'collections', name: 'getCollection', description: '/docs/references/vectordb/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/VectorDB/Collections/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Update.php index 6765074d21..f42f3ff809 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Update.php @@ -49,7 +49,7 @@ class Update extends CollectionAction group: 'collections', name: 'updateCollection', description: '/docs/references/vectordb/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/VectorDB/Collections/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/XList.php index 493696999b..48af093e9c 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/XList.php @@ -40,7 +40,7 @@ class XList extends CollectionXList group: 'collections', name: 'listCollections', description: '/docs/references/vectordb/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/VectorDB/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Create.php index 978f565cec..77a3bc2f8e 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Create.php @@ -37,7 +37,7 @@ class Create extends DatabaseCreate group: 'vectordb', name: 'create', description: '/docs/references/vectordb/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/VectorDB/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Delete.php index 24b0b6b67b..6637ba4eb8 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Delete.php @@ -35,7 +35,7 @@ class Delete extends DatabaseDelete group: 'vectordb', name: 'delete', description: '/docs/references/vectordb/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/VectorDB/Embeddings/Text/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Embeddings/Text/Create.php index 80339f5db4..bc63fac895 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Embeddings/Text/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Embeddings/Text/Create.php @@ -59,7 +59,7 @@ class Create extends CreateDocumentAction name: 'createTextEmbeddings', desc: 'Create Text Embedding', description: '/docs/references/vectordb/create-document.md', - auth: [AuthType::KEY, AuthType::JWT], + auth: [AuthType::ADMIN, AuthType::KEY, AuthType::JWT], responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_OK, diff --git a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Get.php index 18c55b7fe8..a463a09466 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Get.php @@ -32,7 +32,7 @@ class Get extends DatabaseGet group: 'vectordb', name: 'get', description: '/docs/references/vectordb/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/VectorDB/Transactions/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Transactions/Create.php index 10d1f6b764..a8a93b1f4b 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Transactions/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Transactions/Create.php @@ -37,7 +37,7 @@ class Create extends TransactionsCreate group: 'transactions', name: 'createTransaction', description: '/docs/references/vectordb/create-transaction.md', - auth: [AuthType::KEY, AuthType::SESSION, AuthType::JWT], + auth: [AuthType::ADMIN, AuthType::KEY, AuthType::SESSION, AuthType::JWT], responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_CREATED, diff --git a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Transactions/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Transactions/Delete.php index b7bdb3db58..337c7fb115 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Transactions/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Transactions/Delete.php @@ -37,7 +37,7 @@ class Delete extends TransactionsDelete group: 'transactions', name: 'deleteTransaction', description: '/docs/references/vectordb/delete-transaction.md', - auth: [AuthType::KEY, AuthType::SESSION, AuthType::JWT], + auth: [AuthType::ADMIN, AuthType::KEY, AuthType::SESSION, AuthType::JWT], responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_NOCONTENT, diff --git a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Transactions/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Transactions/Get.php index 32a6115f60..d004f395fa 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Transactions/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Transactions/Get.php @@ -37,7 +37,7 @@ class Get extends TransactionsGet group: 'transactions', name: 'getTransaction', description: '/docs/references/vectordb/get-transaction.md', - auth: [AuthType::KEY, AuthType::SESSION, AuthType::JWT], + auth: [AuthType::ADMIN, AuthType::KEY, AuthType::SESSION, AuthType::JWT], responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_OK, diff --git a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Transactions/Operations/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Transactions/Operations/Create.php index 1ffb627f5c..1f13be455e 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Transactions/Operations/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Transactions/Operations/Create.php @@ -39,7 +39,7 @@ class Create extends OperationsCreate group: 'transactions', name: 'createOperations', description: '/docs/references/vectordb/create-operations.md', - auth: [AuthType::KEY, AuthType::SESSION, AuthType::JWT], + auth: [AuthType::ADMIN, AuthType::KEY, AuthType::SESSION, AuthType::JWT], responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_CREATED, diff --git a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Transactions/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Transactions/Update.php index 096fa35354..68333b4128 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Transactions/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Transactions/Update.php @@ -38,7 +38,7 @@ class Update extends TransactionsUpdate group: 'transactions', name: 'updateTransaction', description: '/docs/references/vectordb/update-transaction.md', - auth: [AuthType::KEY, AuthType::SESSION, AuthType::JWT], + auth: [AuthType::ADMIN, AuthType::KEY, AuthType::SESSION, AuthType::JWT], responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_OK, diff --git a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Transactions/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Transactions/XList.php index 43e4a0b36b..a941fc54d5 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Transactions/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Transactions/XList.php @@ -37,7 +37,7 @@ class XList extends TransactionsList group: 'transactions', name: 'listTransactions', description: '/docs/references/vectordb/list-transactions.md', - auth: [AuthType::KEY, AuthType::SESSION, AuthType::JWT], + auth: [AuthType::ADMIN, AuthType::KEY, AuthType::SESSION, AuthType::JWT], responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_OK, diff --git a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Update.php index 71be301a4d..de10cae8c8 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Update.php @@ -37,7 +37,7 @@ class Update extends DatabaseUpdate group: 'vectordb', name: 'update', description: '/docs/references/vectordb/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/VectorDB/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/XList.php index 9f902964f4..60a0edc6ef 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/XList.php @@ -34,7 +34,7 @@ class XList extends DatabaseXList group: 'vectordb', name: 'list', description: '/docs/references/vectordb/list.md', - auth: [AuthType::KEY], + auth: [AuthType::ADMIN, AuthType::KEY], responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_OK,