mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
renamed vectordb to vectordb
This commit is contained in:
@@ -534,7 +534,7 @@ class Event
|
||||
$parsed = self::parseEventPattern($pattern);
|
||||
// to switch the resource types from databases to the required prefix
|
||||
// eg; all databases events get fired with databases. prefix which mainly depicts legacy type
|
||||
// so a projection from databases to the actual prefix(documentsdb, vectordb,etc)
|
||||
// so a projection from databases to the actual prefix(documentsdb, vectorsdb,etc)
|
||||
if ((str_contains($pattern, 'databases.') && $database && $database->getAttribute('type') !== 'legacy')) {
|
||||
$parsed = self::getDatabaseTypeEvents($database, $parsed);
|
||||
}
|
||||
@@ -746,8 +746,8 @@ class Event
|
||||
];
|
||||
break;
|
||||
case 'documentsdb':
|
||||
case 'vectordb':
|
||||
// sending the type itself(eg: documentsdb, vectordb)
|
||||
case 'vectorsdb':
|
||||
// sending the type itself(eg: documentsdb, vectorsdb)
|
||||
$eventMap = [
|
||||
'databases' => $database->getAttribute('type')
|
||||
];
|
||||
|
||||
@@ -493,7 +493,7 @@ class Realtime extends MessagingAdapter
|
||||
case 'databases':
|
||||
case 'tablesdb':
|
||||
case 'documentsdb':
|
||||
case 'vectordb':
|
||||
case 'vectorsdb':
|
||||
$resource = $parts[4] ?? '';
|
||||
if (in_array($resource, ['columns', 'attributes', 'indexes'])) {
|
||||
$channels[] = 'console';
|
||||
@@ -627,7 +627,7 @@ class Realtime extends MessagingAdapter
|
||||
break;
|
||||
|
||||
case 'documentsdb':
|
||||
case 'vectordb':
|
||||
case 'vectorsdb':
|
||||
$channels[] = 'documents';
|
||||
$channels[] = "{$basePrefix}.{$databaseId}.collections.{$resourceId}.documents";
|
||||
$channels[] = "{$basePrefix}.{$databaseId}.collections.{$resourceId}.documents.{$payloadId}";
|
||||
|
||||
@@ -25,7 +25,7 @@ const COLLECTIONS = 'collection';
|
||||
|
||||
const TABLESDB = 'tablesdb';
|
||||
const DOCUMENTSDB = 'documentsdb';
|
||||
const VECTORDB = 'vectordb';
|
||||
const VECTORSDB = 'vectorsdb';
|
||||
|
||||
const MIN_VECTOR_DIMENSION = 1;
|
||||
const MAX_VECTOR_DIMENSION = 16000;
|
||||
|
||||
@@ -25,8 +25,8 @@ class Action extends AppwriteAction
|
||||
if (\str_contains($path, '/documentsdb')) {
|
||||
$this->context = DATABASE_TYPE_DOCUMENTSDB;
|
||||
}
|
||||
if (\str_contains($path, '/vectordb')) {
|
||||
$this->context = DATABASE_TYPE_VECTORDB;
|
||||
if (\str_contains($path, '/vectorsdb')) {
|
||||
$this->context = DATABASE_TYPE_VECTORSDBS;
|
||||
}
|
||||
return parent::setHttpPath($path);
|
||||
}
|
||||
|
||||
@@ -27,8 +27,8 @@ abstract class Action extends UtopiaAction
|
||||
if (\str_contains($path, '/tablesdb')) {
|
||||
$this->context = TABLES;
|
||||
$this->databaseType = TABLESDB;
|
||||
} elseif (\str_contains($path, '/vectordb')) {
|
||||
$this->databaseType = VECTORDB;
|
||||
} elseif (\str_contains($path, '/vectorsdb')) {
|
||||
$this->databaseType = VECTORSDB;
|
||||
}
|
||||
return parent::setHttpPath($path);
|
||||
}
|
||||
|
||||
+2
-2
@@ -30,8 +30,8 @@ abstract class Action extends DatabasesAction
|
||||
$this->context = ROWS;
|
||||
} elseif (str_contains($path, '/documentsdb/')) {
|
||||
$this->databaseType = DATABASE_TYPE_DOCUMENTSDB;
|
||||
} elseif (str_contains($path, '/vectordb/')) {
|
||||
$this->databaseType = DATABASE_TYPE_VECTORDB;
|
||||
} elseif (str_contains($path, '/vectorsdb/')) {
|
||||
$this->databaseType = DATABASE_TYPE_VECTORSDBS;
|
||||
}
|
||||
|
||||
$contextId = '$' . $this->getCollectionsEventsContext() . 'Id';
|
||||
|
||||
@@ -61,13 +61,13 @@ class Create extends Action
|
||||
$sharedTables = \explode(',', System::getEnv('_APP_DATABASE_DOCUMENTSDB_SHARED_TABLES', ''));
|
||||
$sharedTablesV1 = \explode(',', System::getEnv('_APP_DATABASE_DOCUMENTSDB_SHARED_TABLES_V1', ''));
|
||||
break;
|
||||
case VECTORDB:
|
||||
$databases = Config::getParam('pools-vectordb', []);
|
||||
$databaseKeys = System::getEnv('_APP_DATABASE_VECTORDB_KEYS', '');
|
||||
$databaseOverride = System::getEnv('_APP_DATABASE_VECTORDB_OVERRIDE');
|
||||
$dbScheme = System::getEnv('_APP_DB_HOST_VECTORDB', 'postgresql');
|
||||
$sharedTables = \explode(',', System::getEnv('_APP_DATABASE_VECTORDB_SHARED_TABLES', ''));
|
||||
$sharedTablesV1 = \explode(',', System::getEnv('_APP_DATABASE_VECTORDB_SHARED_TABLES_V1', ''));
|
||||
case VECTORSDB:
|
||||
$databases = Config::getParam('pools-vectorsdb', []);
|
||||
$databaseKeys = System::getEnv('_APP_DATABASE_VECTORSDBS_KEYS', '');
|
||||
$databaseOverride = System::getEnv('_APP_DATABASE_VECTORSDBS_OVERRIDE');
|
||||
$dbScheme = System::getEnv('_APP_DB_HOST_VECTORSDBS', 'postgresql');
|
||||
$sharedTables = \explode(',', System::getEnv('_APP_DATABASE_VECTORSDBS_SHARED_TABLES', ''));
|
||||
$sharedTablesV1 = \explode(',', System::getEnv('_APP_DATABASE_VECTORSDBS_SHARED_TABLES_V1', ''));
|
||||
break;
|
||||
default:
|
||||
// legacy/tablesdb
|
||||
@@ -138,7 +138,7 @@ class Create extends Action
|
||||
protected function getDatabaseCollection()
|
||||
{
|
||||
return match ($this->getDatabaseType()) {
|
||||
'vectordb' => (Config::getParam('collections', [])['vectordb'] ?? [])['collections'] ?? [],
|
||||
'vectorsdb' => (Config::getParam('collections', [])['vectorsdb'] ?? [])['collections'] ?? [],
|
||||
default => (Config::getParam('collections', [])['databases'] ?? [])['collections'] ?? [],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -46,9 +46,9 @@ abstract class Action extends DatabasesAction
|
||||
$this->context = COLLECTIONS;
|
||||
$this->databaseType = DOCUMENTSDB;
|
||||
break;
|
||||
case str_contains($path, '/vectordb'):
|
||||
case str_contains($path, '/vectorsdb'):
|
||||
$this->context = COLLECTIONS;
|
||||
$this->databaseType = VECTORDB;
|
||||
$this->databaseType = VECTORSDB;
|
||||
break;
|
||||
}
|
||||
return parent::setHttpPath($path);
|
||||
|
||||
@@ -169,7 +169,7 @@ class Update extends Action
|
||||
$databaseDoc = null;
|
||||
switch ($this->getDatabaseType()) {
|
||||
case DATABASE_TYPE_DOCUMENTSDB:
|
||||
case DATABASE_TYPE_VECTORDB:
|
||||
case DATABASE_TYPE_VECTORSDBS:
|
||||
$databaseDoc = $authorization->skip(fn () => $dbForProject->findOne('databases', [
|
||||
Query::equal('$sequence', [$firstOperation['databaseInternalId']])
|
||||
]));
|
||||
|
||||
@@ -32,7 +32,7 @@ class Get extends Action
|
||||
{
|
||||
$this->databaseType = match (true) {
|
||||
str_contains($path, '/documentsdb') => DATABASE_TYPE_DOCUMENTSDB,
|
||||
str_contains($path, '/vectordb') => DATABASE_TYPE_VECTORDB,
|
||||
str_contains($path, '/vectorsdb') => DATABASE_TYPE_VECTORSDBS,
|
||||
default => DATABASE_TYPE_LEGACY,
|
||||
};
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ class XList extends Action
|
||||
{
|
||||
$this->databaseType = match (true) {
|
||||
str_contains($path, '/documentsdb') => DATABASE_TYPE_DOCUMENTSDB,
|
||||
str_contains($path, '/vectordb') => DATABASE_TYPE_VECTORDB,
|
||||
str_contains($path, '/vectorsdb') => DATABASE_TYPE_VECTORSDBS,
|
||||
default => DATABASE_TYPE_LEGACY,
|
||||
};
|
||||
|
||||
|
||||
+7
-7
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Appwrite\Platform\Modules\Databases\Http\VectorDB\Collections;
|
||||
namespace Appwrite\Platform\Modules\Databases\Http\VectorsDB\Collections;
|
||||
|
||||
use Appwrite\Event\Event;
|
||||
use Appwrite\Extend\Exception;
|
||||
@@ -32,19 +32,19 @@ class Create extends CollectionAction
|
||||
{
|
||||
public static function getName(): string
|
||||
{
|
||||
return 'createVectorDBCollection';
|
||||
return 'createVectorsDBCollection';
|
||||
}
|
||||
|
||||
protected function getResponseModel(): string
|
||||
{
|
||||
return UtopiaResponse::MODEL_VECTORDB_COLLECTION;
|
||||
return UtopiaResponse::MODEL_VECTORSDBS_COLLECTION;
|
||||
}
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this
|
||||
->setHttpMethod(self::HTTP_REQUEST_METHOD_POST)
|
||||
->setHttpPath('/v1/vectordb/:databaseId/collections')
|
||||
->setHttpPath('/v1/vectorsdb/:databaseId/collections')
|
||||
->desc('Create collection')
|
||||
->groups(['api', 'database'])
|
||||
->label('event', 'databases.[databaseId].collections.[collectionId].create')
|
||||
@@ -53,10 +53,10 @@ class Create extends CollectionAction
|
||||
->label('audits.event', 'collection.create')
|
||||
->label('audits.resource', 'database/{request.databaseId}/collection/{response.$id}')
|
||||
->label('sdk', new Method(
|
||||
namespace: 'vectorDB',
|
||||
namespace: 'vectorsDB',
|
||||
group: 'collections',
|
||||
name: 'createCollection',
|
||||
description: '/docs/references/vectordb/create-collection.md',
|
||||
description: '/docs/references/vectorsdb/create-collection.md',
|
||||
auth: [AuthType::ADMIN, AuthType::KEY],
|
||||
responses: [
|
||||
new SDKResponse(
|
||||
@@ -119,7 +119,7 @@ class Create extends CollectionAction
|
||||
|
||||
$attributes = [];
|
||||
$indexes = [];
|
||||
$collections = (Config::getParam('collections', [])['vectordb'] ?? [])['collections'] ?? [];
|
||||
$collections = (Config::getParam('collections', [])['vectorsdb'] ?? [])['collections'] ?? [];
|
||||
foreach ($collections['defaultAttributes'] as $attribute) {
|
||||
if ($attribute['$id'] === 'embeddings') {
|
||||
$attribute['size'] = $dimension;
|
||||
+6
-6
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Appwrite\Platform\Modules\Databases\Http\VectorDB\Collections;
|
||||
namespace Appwrite\Platform\Modules\Databases\Http\VectorsDB\Collections;
|
||||
|
||||
use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Delete as CollectionDelete;
|
||||
use Appwrite\SDK\AuthType;
|
||||
@@ -15,19 +15,19 @@ class Delete extends CollectionDelete
|
||||
{
|
||||
public static function getName(): string
|
||||
{
|
||||
return 'deleteVectorDBCollection';
|
||||
return 'deleteVectorsDBCollection';
|
||||
}
|
||||
|
||||
protected function getResponseModel(): string
|
||||
{
|
||||
return UtopiaResponse::MODEL_VECTORDB_COLLECTION;
|
||||
return UtopiaResponse::MODEL_VECTORSDBS_COLLECTION;
|
||||
}
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this
|
||||
->setHttpMethod(self::HTTP_REQUEST_METHOD_DELETE)
|
||||
->setHttpPath('/v1/vectordb/:databaseId/collections/:collectionId')
|
||||
->setHttpPath('/v1/vectorsdb/:databaseId/collections/:collectionId')
|
||||
->desc('Delete collection')
|
||||
->groups(['api', 'database', 'schema'])
|
||||
->label('scope', 'collections.write')
|
||||
@@ -36,10 +36,10 @@ class Delete extends CollectionDelete
|
||||
->label('audits.event', 'collection.delete')
|
||||
->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}')
|
||||
->label('sdk', new Method(
|
||||
namespace: 'vectorDB',
|
||||
namespace: 'vectorsDB',
|
||||
group: 'collections',
|
||||
name: 'deleteCollection',
|
||||
description: '/docs/references/vectordb/delete-collection.md',
|
||||
description: '/docs/references/vectorsdb/delete-collection.md',
|
||||
auth: [AuthType::ADMIN, AuthType::KEY],
|
||||
responses: [
|
||||
new SDKResponse(
|
||||
+5
-5
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Appwrite\Platform\Modules\Databases\Http\VectorDB\Collections\Documents\Bulk;
|
||||
namespace Appwrite\Platform\Modules\Databases\Http\VectorsDB\Collections\Documents\Bulk;
|
||||
|
||||
use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Bulk\Delete as DocumentsDelete;
|
||||
use Appwrite\SDK\AuthType;
|
||||
@@ -17,7 +17,7 @@ class Delete extends DocumentsDelete
|
||||
{
|
||||
public static function getName(): string
|
||||
{
|
||||
return 'deleteVectorDBDocuments';
|
||||
return 'deleteVectorsDBDocuments';
|
||||
}
|
||||
|
||||
protected function getResponseModel(): string
|
||||
@@ -29,7 +29,7 @@ class Delete extends DocumentsDelete
|
||||
{
|
||||
$this
|
||||
->setHttpMethod(self::HTTP_REQUEST_METHOD_DELETE)
|
||||
->setHttpPath('/v1/vectordb/:databaseId/collections/:collectionId/documents')
|
||||
->setHttpPath('/v1/vectorsdb/:databaseId/collections/:collectionId/documents')
|
||||
->desc('Delete documents')
|
||||
->groups(['api', 'database'])
|
||||
->label('scope', 'documents.write')
|
||||
@@ -40,10 +40,10 @@ class Delete extends DocumentsDelete
|
||||
->label('abuse-limit', APP_LIMIT_WRITE_RATE_DEFAULT)
|
||||
->label('abuse-time', APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT)
|
||||
->label('sdk', new Method(
|
||||
namespace: 'vectorDB',
|
||||
namespace: 'vectorsDB',
|
||||
group: $this->getSdkGroup(),
|
||||
name: 'deleteDocuments',
|
||||
description: '/docs/references/vectordb/delete-documents.md',
|
||||
description: '/docs/references/vectorsdb/delete-documents.md',
|
||||
auth: [AuthType::ADMIN, AuthType::KEY],
|
||||
responses: [
|
||||
new SDKResponse(
|
||||
+5
-5
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Appwrite\Platform\Modules\Databases\Http\VectorDB\Collections\Documents\Bulk;
|
||||
namespace Appwrite\Platform\Modules\Databases\Http\VectorsDB\Collections\Documents\Bulk;
|
||||
|
||||
use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Bulk\Update as DocumentsUpdate;
|
||||
use Appwrite\SDK\AuthType;
|
||||
@@ -18,7 +18,7 @@ class Update extends DocumentsUpdate
|
||||
{
|
||||
public static function getName(): string
|
||||
{
|
||||
return 'updateVectorDBDocuments';
|
||||
return 'updateVectorsDBDocuments';
|
||||
}
|
||||
|
||||
protected function getResponseModel(): string
|
||||
@@ -30,7 +30,7 @@ class Update extends DocumentsUpdate
|
||||
{
|
||||
$this
|
||||
->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH)
|
||||
->setHttpPath('/v1/vectordb/:databaseId/collections/:collectionId/documents')
|
||||
->setHttpPath('/v1/vectorsdb/:databaseId/collections/:collectionId/documents')
|
||||
->desc('Update documents')
|
||||
->groups(['api', 'database'])
|
||||
->label('scope', 'documents.write')
|
||||
@@ -41,10 +41,10 @@ class Update extends DocumentsUpdate
|
||||
->label('abuse-limit', APP_LIMIT_WRITE_RATE_DEFAULT * 2)
|
||||
->label('abuse-time', APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT)
|
||||
->label('sdk', new Method(
|
||||
namespace: 'vectorDB',
|
||||
namespace: 'vectorsDB',
|
||||
group: $this->getSdkGroup(),
|
||||
name: 'updateDocuments',
|
||||
description: '/docs/references/vectordb/update-documents.md',
|
||||
description: '/docs/references/vectorsdb/update-documents.md',
|
||||
auth: [AuthType::ADMIN, AuthType::KEY],
|
||||
responses: [
|
||||
new SDKResponse(
|
||||
+5
-5
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Appwrite\Platform\Modules\Databases\Http\VectorDB\Collections\Documents\Bulk;
|
||||
namespace Appwrite\Platform\Modules\Databases\Http\VectorsDB\Collections\Documents\Bulk;
|
||||
|
||||
use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Bulk\Upsert as DocumentsUpsert;
|
||||
use Appwrite\SDK\AuthType;
|
||||
@@ -17,7 +17,7 @@ class Upsert extends DocumentsUpsert
|
||||
{
|
||||
public static function getName(): string
|
||||
{
|
||||
return 'upsertVectorDBDocuments';
|
||||
return 'upsertVectorsDBDocuments';
|
||||
}
|
||||
|
||||
protected function getResponseModel(): string
|
||||
@@ -29,7 +29,7 @@ class Upsert extends DocumentsUpsert
|
||||
{
|
||||
$this
|
||||
->setHttpMethod(self::HTTP_REQUEST_METHOD_PUT)
|
||||
->setHttpPath('/v1/vectordb/:databaseId/collections/:collectionId/documents')
|
||||
->setHttpPath('/v1/vectorsdb/:databaseId/collections/:collectionId/documents')
|
||||
->desc('Upsert documents')
|
||||
->groups(['api', 'database'])
|
||||
->label('scope', 'documents.write')
|
||||
@@ -41,10 +41,10 @@ class Upsert extends DocumentsUpsert
|
||||
->label('abuse-time', APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT)
|
||||
->label('sdk', [
|
||||
new Method(
|
||||
namespace: 'vectorDB',
|
||||
namespace: 'vectorsDB',
|
||||
group: $this->getSdkGroup(),
|
||||
name: 'upsertDocuments',
|
||||
description: '/docs/references/vectordb/upsert-documents.md',
|
||||
description: '/docs/references/vectorsdb/upsert-documents.md',
|
||||
auth: [AuthType::ADMIN, AuthType::KEY],
|
||||
responses: [
|
||||
new SDKResponse(
|
||||
+7
-7
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Appwrite\Platform\Modules\Databases\Http\VectorDB\Collections\Documents;
|
||||
namespace Appwrite\Platform\Modules\Databases\Http\VectorsDB\Collections\Documents;
|
||||
|
||||
use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Create as DocumentCreate;
|
||||
use Appwrite\SDK\AuthType;
|
||||
@@ -21,7 +21,7 @@ class Create extends DocumentCreate
|
||||
{
|
||||
public static function getName(): string
|
||||
{
|
||||
return 'createVectorDBDocument';
|
||||
return 'createVectorsDBDocument';
|
||||
}
|
||||
|
||||
protected function getResponseModel(): string
|
||||
@@ -38,7 +38,7 @@ class Create extends DocumentCreate
|
||||
{
|
||||
$this
|
||||
->setHttpMethod(self::HTTP_REQUEST_METHOD_POST)
|
||||
->setHttpPath('/v1/vectordb/:databaseId/collections/:collectionId/documents')
|
||||
->setHttpPath('/v1/vectorsdb/:databaseId/collections/:collectionId/documents')
|
||||
->desc('Create document')
|
||||
->groups(['api', 'database'])
|
||||
->label('scope', 'documents.write')
|
||||
@@ -50,11 +50,11 @@ class Create extends DocumentCreate
|
||||
->label('abuse-time', APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT)
|
||||
->label('sdk', [
|
||||
new Method(
|
||||
namespace: 'vectorDB',
|
||||
namespace: 'vectorsDB',
|
||||
group: $this->getSdkGroup(),
|
||||
name: 'createDocument',
|
||||
desc: 'Create document',
|
||||
description: '/docs/references/vectordb/create-document.md',
|
||||
description: '/docs/references/vectorsdb/create-document.md',
|
||||
auth: [AuthType::ADMIN, AuthType::SESSION, AuthType::KEY, AuthType::JWT],
|
||||
responses: [
|
||||
new SDKResponse(
|
||||
@@ -72,11 +72,11 @@ class Create extends DocumentCreate
|
||||
]
|
||||
),
|
||||
new Method(
|
||||
namespace: 'vectorDB',
|
||||
namespace: 'vectorsDB',
|
||||
group: $this->getSdkGroup(),
|
||||
name: 'createDocuments',
|
||||
desc: 'Create documents',
|
||||
description: '/docs/references/vectordb/create-documents.md',
|
||||
description: '/docs/references/vectorsdb/create-documents.md',
|
||||
auth: [AuthType::ADMIN, AuthType::KEY],
|
||||
responses: [
|
||||
new SDKResponse(
|
||||
+5
-5
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Appwrite\Platform\Modules\Databases\Http\VectorDB\Collections\Documents;
|
||||
namespace Appwrite\Platform\Modules\Databases\Http\VectorsDB\Collections\Documents;
|
||||
|
||||
use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Delete as DocumentDelete;
|
||||
use Appwrite\SDK\AuthType;
|
||||
@@ -15,7 +15,7 @@ class Delete extends DocumentDelete
|
||||
{
|
||||
public static function getName(): string
|
||||
{
|
||||
return 'deleteVectorDBDocument';
|
||||
return 'deleteVectorsDBDocument';
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -33,7 +33,7 @@ class Delete extends DocumentDelete
|
||||
{
|
||||
$this
|
||||
->setHttpMethod(self::HTTP_REQUEST_METHOD_DELETE)
|
||||
->setHttpPath('/v1/vectordb/:databaseId/collections/:collectionId/documents/:documentId')
|
||||
->setHttpPath('/v1/vectorsdb/:databaseId/collections/:collectionId/documents/:documentId')
|
||||
->desc('Delete document')
|
||||
->groups(['api', 'database'])
|
||||
->label('scope', 'documents.write')
|
||||
@@ -45,10 +45,10 @@ class Delete extends DocumentDelete
|
||||
->label('abuse-limit', APP_LIMIT_WRITE_RATE_DEFAULT)
|
||||
->label('abuse-time', APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT)
|
||||
->label('sdk', new Method(
|
||||
namespace: 'vectorDB',
|
||||
namespace: 'vectorsDB',
|
||||
group: $this->getSdkGroup(),
|
||||
name: 'deleteDocument',
|
||||
description: '/docs/references/vectordb/delete-document.md',
|
||||
description: '/docs/references/vectorsdb/delete-document.md',
|
||||
auth: [AuthType::ADMIN, AuthType::SESSION, AuthType::KEY, AuthType::JWT],
|
||||
responses: [
|
||||
new SDKResponse(
|
||||
+5
-5
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Appwrite\Platform\Modules\Databases\Http\VectorDB\Collections\Documents;
|
||||
namespace Appwrite\Platform\Modules\Databases\Http\VectorsDB\Collections\Documents;
|
||||
|
||||
use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Get as DocumentGet;
|
||||
use Appwrite\SDK\AuthType;
|
||||
@@ -17,7 +17,7 @@ class Get extends DocumentGet
|
||||
{
|
||||
public static function getName(): string
|
||||
{
|
||||
return 'getVectorDBDocument';
|
||||
return 'getVectorsDBDocument';
|
||||
}
|
||||
|
||||
protected function getResponseModel(): string
|
||||
@@ -29,16 +29,16 @@ class Get extends DocumentGet
|
||||
{
|
||||
$this
|
||||
->setHttpMethod(self::HTTP_REQUEST_METHOD_GET)
|
||||
->setHttpPath('/v1/vectordb/:databaseId/collections/:collectionId/documents/:documentId')
|
||||
->setHttpPath('/v1/vectorsdb/:databaseId/collections/:collectionId/documents/:documentId')
|
||||
->desc('Get document')
|
||||
->groups(['api', 'database'])
|
||||
->label('scope', 'documents.read')
|
||||
->label('resourceType', RESOURCE_TYPE_DATABASES)
|
||||
->label('sdk', new Method(
|
||||
namespace: 'vectorDB',
|
||||
namespace: 'vectorsDB',
|
||||
group: $this->getSdkGroup(),
|
||||
name: 'getDocument',
|
||||
description: '/docs/references/vectordb/get-document.md',
|
||||
description: '/docs/references/vectorsdb/get-document.md',
|
||||
auth: [AuthType::ADMIN, AuthType::SESSION, AuthType::KEY, AuthType::JWT],
|
||||
responses: [
|
||||
new SDKResponse(
|
||||
+5
-5
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Appwrite\Platform\Modules\Databases\Http\VectorDB\Collections\Documents\Logs;
|
||||
namespace Appwrite\Platform\Modules\Databases\Http\VectorsDB\Collections\Documents\Logs;
|
||||
|
||||
use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Logs\XList as DocumentLogXList;
|
||||
use Appwrite\SDK\AuthType;
|
||||
@@ -17,23 +17,23 @@ class XList extends DocumentLogXList
|
||||
{
|
||||
public static function getName(): string
|
||||
{
|
||||
return 'listVectorDBDocumentLogs';
|
||||
return 'listVectorsDBDocumentLogs';
|
||||
}
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this
|
||||
->setHttpMethod(self::HTTP_REQUEST_METHOD_GET)
|
||||
->setHttpPath('/v1/vectordb/:databaseId/collections/:collectionId/documents/:documentId/logs')
|
||||
->setHttpPath('/v1/vectorsdb/:databaseId/collections/:collectionId/documents/:documentId/logs')
|
||||
->desc('List document logs')
|
||||
->groups(['api', 'database'])
|
||||
->label('scope', 'documents.read')
|
||||
->label('resourceType', RESOURCE_TYPE_DATABASES)
|
||||
->label('sdk', new Method(
|
||||
namespace: 'vectorDB',
|
||||
namespace: 'vectorsDB',
|
||||
group: 'logs',
|
||||
name: 'listDocumentLogs',
|
||||
description: '/docs/references/vectordb/get-document-logs.md',
|
||||
description: '/docs/references/vectorsdb/get-document-logs.md',
|
||||
auth: [AuthType::ADMIN],
|
||||
responses: [
|
||||
new SDKResponse(
|
||||
+5
-5
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Appwrite\Platform\Modules\Databases\Http\VectorDB\Collections\Documents;
|
||||
namespace Appwrite\Platform\Modules\Databases\Http\VectorsDB\Collections\Documents;
|
||||
|
||||
use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Update as DocumentUpdate;
|
||||
use Appwrite\SDK\AuthType;
|
||||
@@ -18,7 +18,7 @@ class Update extends DocumentUpdate
|
||||
{
|
||||
public static function getName(): string
|
||||
{
|
||||
return 'updateVectorDBDocument';
|
||||
return 'updateVectorsDBDocument';
|
||||
}
|
||||
|
||||
protected function getResponseModel(): string
|
||||
@@ -30,7 +30,7 @@ class Update extends DocumentUpdate
|
||||
{
|
||||
$this
|
||||
->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH)
|
||||
->setHttpPath('/v1/vectordb/:databaseId/collections/:collectionId/documents/:documentId')
|
||||
->setHttpPath('/v1/vectorsdb/:databaseId/collections/:collectionId/documents/:documentId')
|
||||
->desc('Update document')
|
||||
->groups(['api', 'database'])
|
||||
->label('event', 'databases.[databaseId].collections.[collectionId].documents.[documentId].update')
|
||||
@@ -42,10 +42,10 @@ class Update extends DocumentUpdate
|
||||
->label('abuse-limit', APP_LIMIT_WRITE_RATE_DEFAULT * 2)
|
||||
->label('abuse-time', APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT)
|
||||
->label('sdk', new Method(
|
||||
namespace: 'vectorDB',
|
||||
namespace: 'vectorsDB',
|
||||
group: $this->getSdkGroup(),
|
||||
name: 'updateDocument',
|
||||
description: '/docs/references/vectordb/update-document.md',
|
||||
description: '/docs/references/vectorsdb/update-document.md',
|
||||
auth: [AuthType::ADMIN, AuthType::SESSION, AuthType::KEY, AuthType::JWT],
|
||||
responses: [
|
||||
new SDKResponse(
|
||||
+5
-5
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Appwrite\Platform\Modules\Databases\Http\VectorDB\Collections\Documents;
|
||||
namespace Appwrite\Platform\Modules\Databases\Http\VectorsDB\Collections\Documents;
|
||||
|
||||
use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Upsert as DocumentUpsert;
|
||||
use Appwrite\SDK\AuthType;
|
||||
@@ -19,7 +19,7 @@ class Upsert extends DocumentUpsert
|
||||
{
|
||||
public static function getName(): string
|
||||
{
|
||||
return 'upsertVectorDBDocument';
|
||||
return 'upsertVectorsDBDocument';
|
||||
}
|
||||
|
||||
protected function getResponseModel(): string
|
||||
@@ -31,7 +31,7 @@ class Upsert extends DocumentUpsert
|
||||
{
|
||||
$this
|
||||
->setHttpMethod(self::HTTP_REQUEST_METHOD_PUT)
|
||||
->setHttpPath('/v1/vectordb/:databaseId/collections/:collectionId/documents/:documentId')
|
||||
->setHttpPath('/v1/vectorsdb/:databaseId/collections/:collectionId/documents/:documentId')
|
||||
->desc('Upsert a document')
|
||||
->groups(['api', 'database'])
|
||||
->label('event', 'databases.[databaseId].collections.[collectionId].documents.[documentId].upsert')
|
||||
@@ -44,10 +44,10 @@ class Upsert extends DocumentUpsert
|
||||
->label('abuse-time', APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT)
|
||||
->label('sdk', [
|
||||
new Method(
|
||||
namespace: 'vectorDB',
|
||||
namespace: 'vectorsDB',
|
||||
group: $this->getSdkGroup(),
|
||||
name: 'upsertDocument',
|
||||
description: '/docs/references/vectordb/upsert-document.md',
|
||||
description: '/docs/references/vectorsdb/upsert-document.md',
|
||||
auth: [AuthType::ADMIN, AuthType::SESSION, AuthType::KEY, AuthType::JWT],
|
||||
responses: [
|
||||
new SDKResponse(
|
||||
+5
-5
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Appwrite\Platform\Modules\Databases\Http\VectorDB\Collections\Documents;
|
||||
namespace Appwrite\Platform\Modules\Databases\Http\VectorsDB\Collections\Documents;
|
||||
|
||||
use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\XList as DocumentXList;
|
||||
use Appwrite\SDK\AuthType;
|
||||
@@ -19,7 +19,7 @@ class XList extends DocumentXList
|
||||
{
|
||||
public static function getName(): string
|
||||
{
|
||||
return 'listVectorDBDocuments';
|
||||
return 'listVectorsDBDocuments';
|
||||
}
|
||||
|
||||
protected function getResponseModel(): string
|
||||
@@ -31,16 +31,16 @@ class XList extends DocumentXList
|
||||
{
|
||||
$this
|
||||
->setHttpMethod(self::HTTP_REQUEST_METHOD_GET)
|
||||
->setHttpPath('/v1/vectordb/:databaseId/collections/:collectionId/documents')
|
||||
->setHttpPath('/v1/vectorsdb/:databaseId/collections/:collectionId/documents')
|
||||
->desc('List documents')
|
||||
->groups(['api', 'database'])
|
||||
->label('scope', 'documents.read')
|
||||
->label('resourceType', RESOURCE_TYPE_DATABASES)
|
||||
->label('sdk', new Method(
|
||||
namespace: 'vectorDB',
|
||||
namespace: 'vectorsDB',
|
||||
group: $this->getSdkGroup(),
|
||||
name: 'listDocuments',
|
||||
description: '/docs/references/vectordb/list-documents.md',
|
||||
description: '/docs/references/vectorsdb/list-documents.md',
|
||||
auth: [AuthType::ADMIN, AuthType::SESSION, AuthType::KEY, AuthType::JWT],
|
||||
responses: [
|
||||
new SDKResponse(
|
||||
+6
-6
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Appwrite\Platform\Modules\Databases\Http\VectorDB\Collections;
|
||||
namespace Appwrite\Platform\Modules\Databases\Http\VectorsDB\Collections;
|
||||
|
||||
use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Get as CollectionGet;
|
||||
use Appwrite\SDK\AuthType;
|
||||
@@ -15,28 +15,28 @@ class Get extends CollectionGet
|
||||
{
|
||||
public static function getName(): string
|
||||
{
|
||||
return 'getVectorDBCollection';
|
||||
return 'getVectorsDBCollection';
|
||||
}
|
||||
|
||||
protected function getResponseModel(): string
|
||||
{
|
||||
return UtopiaResponse::MODEL_VECTORDB_COLLECTION;
|
||||
return UtopiaResponse::MODEL_VECTORSDBS_COLLECTION;
|
||||
}
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this
|
||||
->setHttpMethod(self::HTTP_REQUEST_METHOD_GET)
|
||||
->setHttpPath('/v1/vectordb/:databaseId/collections/:collectionId')
|
||||
->setHttpPath('/v1/vectorsdb/:databaseId/collections/:collectionId')
|
||||
->desc('Get collection')
|
||||
->groups(['api', 'database'])
|
||||
->label('scope', 'collections.read')
|
||||
->label('resourceType', RESOURCE_TYPE_DATABASES)
|
||||
->label('sdk', new Method(
|
||||
namespace: 'vectorDB',
|
||||
namespace: 'vectorsDB',
|
||||
group: 'collections',
|
||||
name: 'getCollection',
|
||||
description: '/docs/references/vectordb/get-collection.md',
|
||||
description: '/docs/references/vectorsdb/get-collection.md',
|
||||
auth: [AuthType::ADMIN, AuthType::KEY],
|
||||
responses: [
|
||||
new SDKResponse(
|
||||
+5
-5
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Appwrite\Platform\Modules\Databases\Http\VectorDB\Collections\Indexes;
|
||||
namespace Appwrite\Platform\Modules\Databases\Http\VectorsDB\Collections\Indexes;
|
||||
|
||||
use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Indexes\Create as IndexCreate;
|
||||
use Appwrite\SDK\AuthType;
|
||||
@@ -21,7 +21,7 @@ class Create extends IndexCreate
|
||||
{
|
||||
public static function getName(): string
|
||||
{
|
||||
return 'createVectorDBIndex';
|
||||
return 'createVectorsDBIndex';
|
||||
}
|
||||
|
||||
protected function getResponseModel(): string
|
||||
@@ -33,7 +33,7 @@ class Create extends IndexCreate
|
||||
{
|
||||
$this
|
||||
->setHttpMethod(self::HTTP_REQUEST_METHOD_POST)
|
||||
->setHttpPath('/v1/vectordb/:databaseId/collections/:collectionId/indexes')
|
||||
->setHttpPath('/v1/vectorsdb/:databaseId/collections/:collectionId/indexes')
|
||||
->desc('Create index')
|
||||
->groups(['api', 'database'])
|
||||
->label('event', 'databases.[databaseId].tables.[tableId].indexes.[indexId].create')
|
||||
@@ -42,10 +42,10 @@ class Create extends IndexCreate
|
||||
->label('audits.event', 'index.create')
|
||||
->label('audits.resource', 'database/{request.databaseId}/collection/{request.tableId}')
|
||||
->label('sdk', new Method(
|
||||
namespace: 'vectorDB',
|
||||
namespace: 'vectorsDB',
|
||||
group: $this->getSdkGroup(),
|
||||
name: 'createIndex',
|
||||
description: '/docs/references/vectordb/create-index.md',
|
||||
description: '/docs/references/vectorsdb/create-index.md',
|
||||
auth: [AuthType::ADMIN, AuthType::KEY],
|
||||
responses: [
|
||||
new SDKResponse(
|
||||
+5
-5
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Appwrite\Platform\Modules\Databases\Http\VectorDB\Collections\Indexes;
|
||||
namespace Appwrite\Platform\Modules\Databases\Http\VectorsDB\Collections\Indexes;
|
||||
|
||||
use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Indexes\Delete as IndexDelete;
|
||||
use Appwrite\SDK\AuthType;
|
||||
@@ -16,7 +16,7 @@ class Delete extends IndexDelete
|
||||
{
|
||||
public static function getName(): string
|
||||
{
|
||||
return 'deleteVectorDBIndex';
|
||||
return 'deleteVectorsDBIndex';
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -32,7 +32,7 @@ class Delete extends IndexDelete
|
||||
{
|
||||
$this
|
||||
->setHttpMethod(self::HTTP_REQUEST_METHOD_DELETE)
|
||||
->setHttpPath('/v1/vectordb/:databaseId/collections/:collectionId/indexes/:key')
|
||||
->setHttpPath('/v1/vectorsdb/:databaseId/collections/:collectionId/indexes/:key')
|
||||
->desc('Delete index')
|
||||
->groups(['api', 'database'])
|
||||
->label('scope', 'collections.write')
|
||||
@@ -41,10 +41,10 @@ class Delete extends IndexDelete
|
||||
->label('audits.event', 'index.delete')
|
||||
->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}')
|
||||
->label('sdk', new Method(
|
||||
namespace: 'vectorDB',
|
||||
namespace: 'vectorsDB',
|
||||
group: $this->getSdkGroup(),
|
||||
name: 'deleteIndex', // getName needs to be different from parent action to avoid conflict in path name
|
||||
description: '/docs/references/vectordb/delete-index.md',
|
||||
description: '/docs/references/vectorsdb/delete-index.md',
|
||||
auth: [AuthType::ADMIN, AuthType::KEY],
|
||||
responses: [
|
||||
new SDKResponse(
|
||||
+5
-5
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Appwrite\Platform\Modules\Databases\Http\VectorDB\Collections\Indexes;
|
||||
namespace Appwrite\Platform\Modules\Databases\Http\VectorsDB\Collections\Indexes;
|
||||
|
||||
use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Indexes\Get as IndexGet;
|
||||
use Appwrite\SDK\AuthType;
|
||||
@@ -16,7 +16,7 @@ class Get extends IndexGet
|
||||
{
|
||||
public static function getName(): string
|
||||
{
|
||||
return 'getVectorDBIndex';
|
||||
return 'getVectorsDBIndex';
|
||||
}
|
||||
|
||||
protected function getResponseModel(): string
|
||||
@@ -28,16 +28,16 @@ class Get extends IndexGet
|
||||
{
|
||||
$this
|
||||
->setHttpMethod(self::HTTP_REQUEST_METHOD_GET)
|
||||
->setHttpPath('/v1/vectordb/:databaseId/collections/:collectionId/indexes/:key')
|
||||
->setHttpPath('/v1/vectorsdb/:databaseId/collections/:collectionId/indexes/:key')
|
||||
->desc('Get index')
|
||||
->groups(['api', 'database'])
|
||||
->label('scope', 'collections.read')
|
||||
->label('resourceType', RESOURCE_TYPE_DATABASES)
|
||||
->label('sdk', new Method(
|
||||
namespace: 'vectorDB',
|
||||
namespace: 'vectorsDB',
|
||||
group: $this->getSdkGroup(),
|
||||
name: 'getIndex', // getName needs to be different from parent action to avoid conflict in path name
|
||||
description: '/docs/references/vectordb/get-index.md',
|
||||
description: '/docs/references/vectorsdb/get-index.md',
|
||||
auth: [AuthType::ADMIN, AuthType::KEY],
|
||||
responses: [
|
||||
new SDKResponse(
|
||||
+5
-5
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Appwrite\Platform\Modules\Databases\Http\VectorDB\Collections\Indexes;
|
||||
namespace Appwrite\Platform\Modules\Databases\Http\VectorsDB\Collections\Indexes;
|
||||
|
||||
use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Indexes\XList as IndexXList;
|
||||
use Appwrite\SDK\AuthType;
|
||||
@@ -17,7 +17,7 @@ class XList extends IndexXList
|
||||
{
|
||||
public static function getName(): string
|
||||
{
|
||||
return 'listVectorDBIndexes';
|
||||
return 'listVectorsDBIndexes';
|
||||
}
|
||||
|
||||
protected function getResponseModel(): string
|
||||
@@ -29,16 +29,16 @@ class XList extends IndexXList
|
||||
{
|
||||
$this
|
||||
->setHttpMethod(self::HTTP_REQUEST_METHOD_GET)
|
||||
->setHttpPath('/v1/vectordb/:databaseId/collections/:collectionId/indexes')
|
||||
->setHttpPath('/v1/vectorsdb/:databaseId/collections/:collectionId/indexes')
|
||||
->desc('List indexes')
|
||||
->groups(['api', 'database'])
|
||||
->label('scope', 'collections.read')
|
||||
->label('resourceType', RESOURCE_TYPE_DATABASES)
|
||||
->label('sdk', new Method(
|
||||
namespace: 'vectorDB',
|
||||
namespace: 'vectorsDB',
|
||||
group: $this->getSdkGroup(),
|
||||
name: 'listIndexes', // getName needs to be different from parent action to avoid conflict in path name
|
||||
description: '/docs/references/vectordb/list-indexes.md',
|
||||
description: '/docs/references/vectorsdb/list-indexes.md',
|
||||
auth: [AuthType::ADMIN, AuthType::KEY],
|
||||
responses: [
|
||||
new SDKResponse(
|
||||
+5
-5
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Appwrite\Platform\Modules\Databases\Http\VectorDB\Collections\Logs;
|
||||
namespace Appwrite\Platform\Modules\Databases\Http\VectorsDB\Collections\Logs;
|
||||
|
||||
use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Logs\XList as CollectionLogXList;
|
||||
use Appwrite\SDK\AuthType;
|
||||
@@ -17,23 +17,23 @@ class XList extends CollectionLogXList
|
||||
{
|
||||
public static function getName(): string
|
||||
{
|
||||
return 'listVectorDBCollectionLogs';
|
||||
return 'listVectorsDBCollectionLogs';
|
||||
}
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this
|
||||
->setHttpMethod(self::HTTP_REQUEST_METHOD_GET)
|
||||
->setHttpPath('/v1/vectordb/:databaseId/collections/:collectionId/logs')
|
||||
->setHttpPath('/v1/vectorsdb/:databaseId/collections/:collectionId/logs')
|
||||
->desc('List collection logs')
|
||||
->groups(['api', 'database'])
|
||||
->label('scope', 'collections.read')
|
||||
->label('resourceType', RESOURCE_TYPE_DATABASES)
|
||||
->label('sdk', new Method(
|
||||
namespace: 'vectorDB',
|
||||
namespace: 'vectorsDB',
|
||||
group: $this->getSdkGroup(),
|
||||
name: 'listCollectionLogs',
|
||||
description: '/docs/references/vectordb/get-collection-logs.md',
|
||||
description: '/docs/references/vectorsdb/get-collection-logs.md',
|
||||
auth: [AuthType::ADMIN],
|
||||
responses: [
|
||||
new SDKResponse(
|
||||
+7
-7
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Appwrite\Platform\Modules\Databases\Http\VectorDB\Collections;
|
||||
namespace Appwrite\Platform\Modules\Databases\Http\VectorsDB\Collections;
|
||||
|
||||
use Appwrite\Event\Event;
|
||||
use Appwrite\Extend\Exception;
|
||||
@@ -24,19 +24,19 @@ class Update extends CollectionAction
|
||||
{
|
||||
public static function getName(): string
|
||||
{
|
||||
return 'updateVectorDBCollection';
|
||||
return 'updateVectorsDBCollection';
|
||||
}
|
||||
|
||||
protected function getResponseModel(): string
|
||||
{
|
||||
return UtopiaResponse::MODEL_VECTORDB_COLLECTION;
|
||||
return UtopiaResponse::MODEL_VECTORSDBS_COLLECTION;
|
||||
}
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this
|
||||
->setHttpMethod(self::HTTP_REQUEST_METHOD_PUT)
|
||||
->setHttpPath('/v1/vectordb/:databaseId/collections/:collectionId')
|
||||
->setHttpPath('/v1/vectorsdb/:databaseId/collections/:collectionId')
|
||||
->desc('Update collection')
|
||||
->groups(['api', 'database', 'schema'])
|
||||
->label('scope', 'collections.write')
|
||||
@@ -45,15 +45,15 @@ class Update extends CollectionAction
|
||||
->label('audits.event', 'collection.update')
|
||||
->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}')
|
||||
->label('sdk', new Method(
|
||||
namespace: 'vectorDB',
|
||||
namespace: 'vectorsDB',
|
||||
group: 'collections',
|
||||
name: 'updateCollection',
|
||||
description: '/docs/references/vectordb/update-collection.md',
|
||||
description: '/docs/references/vectorsdb/update-collection.md',
|
||||
auth: [AuthType::ADMIN, AuthType::KEY],
|
||||
responses: [
|
||||
new SDKResponse(
|
||||
code: SwooleResponse::STATUS_CODE_OK,
|
||||
model: UtopiaResponse::MODEL_VECTORDB_COLLECTION,
|
||||
model: UtopiaResponse::MODEL_VECTORSDBS_COLLECTION,
|
||||
)
|
||||
],
|
||||
contentType: ContentType::JSON
|
||||
+6
-6
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Appwrite\Platform\Modules\Databases\Http\VectorDB\Collections\Usage;
|
||||
namespace Appwrite\Platform\Modules\Databases\Http\VectorsDB\Collections\Usage;
|
||||
|
||||
use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Usage\Get as CollectionUsageGet;
|
||||
use Appwrite\SDK\AuthType;
|
||||
@@ -16,7 +16,7 @@ class Get extends CollectionUsageGet
|
||||
{
|
||||
public static function getName(): string
|
||||
{
|
||||
return 'getVectorDBCollectionUsage';
|
||||
return 'getVectorsDBCollectionUsage';
|
||||
}
|
||||
|
||||
protected function getResponseModel(): string
|
||||
@@ -26,23 +26,23 @@ class Get extends CollectionUsageGet
|
||||
|
||||
protected function getMetric(): string
|
||||
{
|
||||
return METRIC_DATABASE_ID_COLLECTION_ID_DOCUMENTS_VECTORDB;
|
||||
return METRIC_DATABASE_ID_COLLECTION_ID_DOCUMENTS_VECTORSDBS;
|
||||
}
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this
|
||||
->setHttpMethod(self::HTTP_REQUEST_METHOD_GET)
|
||||
->setHttpPath('/v1/vectordb/:databaseId/collections/:collectionId/usage')
|
||||
->setHttpPath('/v1/vectorsdb/:databaseId/collections/:collectionId/usage')
|
||||
->desc('Get collection usage stats')
|
||||
->groups(['api', 'database', 'usage'])
|
||||
->label('scope', 'collections.read')
|
||||
->label('resourceType', RESOURCE_TYPE_DATABASES)
|
||||
->label('sdk', new Method(
|
||||
namespace: 'vectorDB',
|
||||
namespace: 'vectorsDB',
|
||||
group: null,
|
||||
name: 'getCollectionUsage',
|
||||
description: '/docs/references/vectordb/get-collection-usage.md',
|
||||
description: '/docs/references/vectorsdb/get-collection-usage.md',
|
||||
auth: [AuthType::ADMIN],
|
||||
responses: [
|
||||
new SDKResponse(
|
||||
+6
-6
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Appwrite\Platform\Modules\Databases\Http\VectorDB\Collections;
|
||||
namespace Appwrite\Platform\Modules\Databases\Http\VectorsDB\Collections;
|
||||
|
||||
use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\XList as CollectionXList;
|
||||
use Appwrite\SDK\AuthType;
|
||||
@@ -18,28 +18,28 @@ class XList extends CollectionXList
|
||||
{
|
||||
public static function getName(): string
|
||||
{
|
||||
return 'listVectorDBCollections';
|
||||
return 'listVectorsDBCollections';
|
||||
}
|
||||
|
||||
protected function getResponseModel(): string
|
||||
{
|
||||
return UtopiaResponse::MODEL_VECTORDB_COLLECTION_LIST;
|
||||
return UtopiaResponse::MODEL_VECTORSDBS_COLLECTION_LIST;
|
||||
}
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this
|
||||
->setHttpMethod(self::HTTP_REQUEST_METHOD_GET)
|
||||
->setHttpPath('/v1/vectordb/:databaseId/collections')
|
||||
->setHttpPath('/v1/vectorsdb/:databaseId/collections')
|
||||
->desc('List collections')
|
||||
->groups(['api', 'database'])
|
||||
->label('scope', 'collections.read')
|
||||
->label('resourceType', RESOURCE_TYPE_DATABASES)
|
||||
->label('sdk', new Method(
|
||||
namespace: 'vectorDB',
|
||||
namespace: 'vectorsDB',
|
||||
group: 'collections',
|
||||
name: 'listCollections',
|
||||
description: '/docs/references/vectordb/list-collections.md',
|
||||
description: '/docs/references/vectorsdb/list-collections.md',
|
||||
auth: [AuthType::ADMIN, AuthType::KEY],
|
||||
responses: [
|
||||
new SDKResponse(
|
||||
+6
-6
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Appwrite\Platform\Modules\Databases\Http\VectorDB;
|
||||
namespace Appwrite\Platform\Modules\Databases\Http\VectorsDB;
|
||||
|
||||
use Appwrite\Platform\Modules\Databases\Http\Databases\Create as DatabaseCreate;
|
||||
use Appwrite\SDK\AuthType;
|
||||
@@ -17,14 +17,14 @@ class Create extends DatabaseCreate
|
||||
{
|
||||
public static function getName(): string
|
||||
{
|
||||
return 'createVectorDBDatabase';
|
||||
return 'createVectorsDBDatabase';
|
||||
}
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this
|
||||
->setHttpMethod(self::HTTP_REQUEST_METHOD_POST)
|
||||
->setHttpPath('/v1/vectordb')
|
||||
->setHttpPath('/v1/vectorsdb')
|
||||
->desc('Create database')
|
||||
->groups(['api', 'database'])
|
||||
->label('event', 'databases.[databaseId].create')
|
||||
@@ -33,10 +33,10 @@ class Create extends DatabaseCreate
|
||||
->label('audits.event', 'database.create')
|
||||
->label('audits.resource', 'database/{response.$id}')
|
||||
->label('sdk', new Method(
|
||||
namespace: 'vectorDB',
|
||||
group: 'vectordb',
|
||||
namespace: 'vectorsDB',
|
||||
group: 'vectorsdb',
|
||||
name: 'create',
|
||||
description: '/docs/references/vectordb/create.md',
|
||||
description: '/docs/references/vectorsdb/create.md',
|
||||
auth: [AuthType::ADMIN, AuthType::KEY],
|
||||
responses: [
|
||||
new SDKResponse(
|
||||
+6
-6
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Appwrite\Platform\Modules\Databases\Http\VectorDB;
|
||||
namespace Appwrite\Platform\Modules\Databases\Http\VectorsDB;
|
||||
|
||||
use Appwrite\Platform\Modules\Databases\Http\Databases\Delete as DatabaseDelete;
|
||||
use Appwrite\SDK\AuthType;
|
||||
@@ -15,14 +15,14 @@ class Delete extends DatabaseDelete
|
||||
{
|
||||
public static function getName(): string
|
||||
{
|
||||
return 'deleteVectorDBDatabase';
|
||||
return 'deleteVectorsDBDatabase';
|
||||
}
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this
|
||||
->setHttpMethod(self::HTTP_REQUEST_METHOD_DELETE)
|
||||
->setHttpPath('/v1/vectordb/:databaseId')
|
||||
->setHttpPath('/v1/vectorsdb/:databaseId')
|
||||
->desc('Delete database')
|
||||
->groups(['api', 'database', 'schema'])
|
||||
->label('scope', 'databases.write')
|
||||
@@ -31,10 +31,10 @@ class Delete extends DatabaseDelete
|
||||
->label('audits.event', 'database.delete')
|
||||
->label('audits.resource', 'database/{request.databaseId}')
|
||||
->label('sdk', new Method(
|
||||
namespace: 'vectorDB',
|
||||
group: 'vectordb',
|
||||
namespace: 'vectorsDB',
|
||||
group: 'vectorsdb',
|
||||
name: 'delete',
|
||||
description: '/docs/references/vectordb/delete.md',
|
||||
description: '/docs/references/vectorsdb/delete.md',
|
||||
auth: [AuthType::ADMIN, AuthType::KEY],
|
||||
responses: [
|
||||
new SDKResponse(
|
||||
+5
-5
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Appwrite\Platform\Modules\Databases\Http\VectorDB\Embeddings\Text;
|
||||
namespace Appwrite\Platform\Modules\Databases\Http\VectorsDB\Embeddings\Text;
|
||||
|
||||
use Appwrite\Event\StatsUsage;
|
||||
use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Action as CreateDocumentAction;
|
||||
@@ -42,23 +42,23 @@ class Create extends CreateDocumentAction
|
||||
{
|
||||
$this
|
||||
->setHttpMethod(self::HTTP_REQUEST_METHOD_POST)
|
||||
->setHttpPath('/v1/vectordb/embeddings/text')
|
||||
->setHttpPath('/v1/vectorsdb/embeddings/text')
|
||||
->desc('Create Text Embeddings')
|
||||
->groups(['api', 'database'])
|
||||
->label('scope', 'documents.write')
|
||||
->label('resourceType', RESOURCE_TYPE_EMBEDDINGS_TEXT)
|
||||
->label('audits.event', 'embedding.create')
|
||||
->label('audits.resource', 'vectordb/embeddings/text')
|
||||
->label('audits.resource', 'vectorsdb/embeddings/text')
|
||||
->label('abuse-key', 'ip:{ip},method:{method},url:{url},userId:{userId}')
|
||||
->label('abuse-limit', APP_LIMIT_WRITE_RATE_DEFAULT * 2)
|
||||
->label('abuse-time', APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT)
|
||||
->label('sdk', [
|
||||
new Method(
|
||||
namespace: 'vectorDB',
|
||||
namespace: 'vectorsDB',
|
||||
group: $this->getSdkGroup(),
|
||||
name: 'createTextEmbeddings',
|
||||
desc: 'Create Text Embedding',
|
||||
description: '/docs/references/vectordb/create-document.md',
|
||||
description: '/docs/references/vectorsdb/create-document.md',
|
||||
auth: [AuthType::ADMIN, AuthType::KEY, AuthType::JWT],
|
||||
responses: [
|
||||
new SDKResponse(
|
||||
+6
-6
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Appwrite\Platform\Modules\Databases\Http\VectorDB;
|
||||
namespace Appwrite\Platform\Modules\Databases\Http\VectorsDB;
|
||||
|
||||
use Appwrite\Platform\Modules\Databases\Http\Databases\Get as DatabaseGet;
|
||||
use Appwrite\SDK\AuthType;
|
||||
@@ -15,23 +15,23 @@ class Get extends DatabaseGet
|
||||
{
|
||||
public static function getName(): string
|
||||
{
|
||||
return 'getVectorDBDatabase';
|
||||
return 'getVectorsDBDatabase';
|
||||
}
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this
|
||||
->setHttpMethod(self::HTTP_REQUEST_METHOD_GET)
|
||||
->setHttpPath('/v1/vectordb/:databaseId')
|
||||
->setHttpPath('/v1/vectorsdb/:databaseId')
|
||||
->desc('Get database')
|
||||
->groups(['api', 'database'])
|
||||
->label('scope', 'databases.read')
|
||||
->label('resourceType', RESOURCE_TYPE_DATABASES)
|
||||
->label('sdk', new Method(
|
||||
namespace: 'vectorDB',
|
||||
group: 'vectordb',
|
||||
namespace: 'vectorsDB',
|
||||
group: 'vectorsdb',
|
||||
name: 'get',
|
||||
description: '/docs/references/vectordb/get.md',
|
||||
description: '/docs/references/vectorsdb/get.md',
|
||||
auth: [AuthType::ADMIN, AuthType::KEY],
|
||||
responses: [
|
||||
new SDKResponse(
|
||||
+5
-5
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Appwrite\Platform\Modules\Databases\Http\VectorDB\Logs;
|
||||
namespace Appwrite\Platform\Modules\Databases\Http\VectorsDB\Logs;
|
||||
|
||||
use Appwrite\Platform\Modules\Databases\Http\Databases\Logs\XList as DatabaseLogs;
|
||||
use Appwrite\SDK\AuthType;
|
||||
@@ -18,24 +18,24 @@ class XList extends DatabaseLogs
|
||||
{
|
||||
public static function getName(): string
|
||||
{
|
||||
return 'listVectorDBLogs';
|
||||
return 'listVectorsDBLogs';
|
||||
}
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this
|
||||
->setHttpMethod(self::HTTP_REQUEST_METHOD_GET)
|
||||
->setHttpPath('/v1/vectordb/:databaseId/logs')
|
||||
->setHttpPath('/v1/vectorsdb/:databaseId/logs')
|
||||
->desc('List database logs')
|
||||
->groups(['api', 'database'])
|
||||
->label('scope', 'databases.read')
|
||||
->label('resourceType', RESOURCE_TYPE_DATABASES)
|
||||
->label('sdk', [
|
||||
new Method(
|
||||
namespace: 'vectorDB',
|
||||
namespace: 'vectorsDB',
|
||||
group: 'logs',
|
||||
name: 'listDatabaseLogs',
|
||||
description: '/docs/references/vectordb/get-logs.md',
|
||||
description: '/docs/references/vectorsdb/get-logs.md',
|
||||
auth: [AuthType::ADMIN],
|
||||
responses: [
|
||||
new SDKResponse(
|
||||
+5
-5
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Appwrite\Platform\Modules\Databases\Http\VectorDB\Transactions;
|
||||
namespace Appwrite\Platform\Modules\Databases\Http\VectorsDB\Transactions;
|
||||
|
||||
use Appwrite\Platform\Modules\Databases\Http\Databases\Transactions\Create as TransactionsCreate;
|
||||
use Appwrite\SDK\AuthType;
|
||||
@@ -15,7 +15,7 @@ class Create extends TransactionsCreate
|
||||
{
|
||||
public static function getName(): string
|
||||
{
|
||||
return 'createVectorDBTransaction';
|
||||
return 'createVectorsDBTransaction';
|
||||
}
|
||||
|
||||
protected function getResponseModel(): string
|
||||
@@ -27,16 +27,16 @@ class Create extends TransactionsCreate
|
||||
{
|
||||
$this
|
||||
->setHttpMethod(self::HTTP_REQUEST_METHOD_POST)
|
||||
->setHttpPath('/v1/vectordb/transactions')
|
||||
->setHttpPath('/v1/vectorsdb/transactions')
|
||||
->desc('Create transaction')
|
||||
->groups(['api', 'database', 'transactions'])
|
||||
->label('scope', 'documents.write')
|
||||
->label('resourceType', RESOURCE_TYPE_DATABASES)
|
||||
->label('sdk', new Method(
|
||||
namespace: 'vectorDB',
|
||||
namespace: 'vectorsDB',
|
||||
group: 'transactions',
|
||||
name: 'createTransaction',
|
||||
description: '/docs/references/vectordb/create-transaction.md',
|
||||
description: '/docs/references/vectorsdb/create-transaction.md',
|
||||
auth: [AuthType::ADMIN, AuthType::KEY, AuthType::SESSION, AuthType::JWT],
|
||||
responses: [
|
||||
new SDKResponse(
|
||||
+5
-5
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Appwrite\Platform\Modules\Databases\Http\VectorDB\Transactions;
|
||||
namespace Appwrite\Platform\Modules\Databases\Http\VectorsDB\Transactions;
|
||||
|
||||
use Appwrite\Platform\Modules\Databases\Http\Databases\Transactions\Delete as TransactionsDelete;
|
||||
use Appwrite\SDK\AuthType;
|
||||
@@ -15,7 +15,7 @@ class Delete extends TransactionsDelete
|
||||
{
|
||||
public static function getName(): string
|
||||
{
|
||||
return 'deleteVectorDBTransaction';
|
||||
return 'deleteVectorsDBTransaction';
|
||||
}
|
||||
|
||||
protected function getResponseModel(): string
|
||||
@@ -27,16 +27,16 @@ class Delete extends TransactionsDelete
|
||||
{
|
||||
$this
|
||||
->setHttpMethod(self::HTTP_REQUEST_METHOD_DELETE)
|
||||
->setHttpPath('/v1/vectordb/transactions/:transactionId')
|
||||
->setHttpPath('/v1/vectorsdb/transactions/:transactionId')
|
||||
->desc('Delete transaction')
|
||||
->groups(['api', 'database', 'transactions'])
|
||||
->label('scope', 'documents.write')
|
||||
->label('resourceType', RESOURCE_TYPE_DATABASES)
|
||||
->label('sdk', new Method(
|
||||
namespace: 'vectorDB',
|
||||
namespace: 'vectorsDB',
|
||||
group: 'transactions',
|
||||
name: 'deleteTransaction',
|
||||
description: '/docs/references/vectordb/delete-transaction.md',
|
||||
description: '/docs/references/vectorsdb/delete-transaction.md',
|
||||
auth: [AuthType::ADMIN, AuthType::KEY, AuthType::SESSION, AuthType::JWT],
|
||||
responses: [
|
||||
new SDKResponse(
|
||||
+5
-5
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Appwrite\Platform\Modules\Databases\Http\VectorDB\Transactions;
|
||||
namespace Appwrite\Platform\Modules\Databases\Http\VectorsDB\Transactions;
|
||||
|
||||
use Appwrite\Platform\Modules\Databases\Http\Databases\Transactions\Get as TransactionsGet;
|
||||
use Appwrite\SDK\AuthType;
|
||||
@@ -15,7 +15,7 @@ class Get extends TransactionsGet
|
||||
{
|
||||
public static function getName(): string
|
||||
{
|
||||
return 'getVectorDBTransaction';
|
||||
return 'getVectorsDBTransaction';
|
||||
}
|
||||
|
||||
protected function getResponseModel(): string
|
||||
@@ -27,16 +27,16 @@ class Get extends TransactionsGet
|
||||
{
|
||||
$this
|
||||
->setHttpMethod(self::HTTP_REQUEST_METHOD_GET)
|
||||
->setHttpPath('/v1/vectordb/transactions/:transactionId')
|
||||
->setHttpPath('/v1/vectorsdb/transactions/:transactionId')
|
||||
->desc('Get transaction')
|
||||
->groups(['api', 'database', 'transactions'])
|
||||
->label('scope', 'documents.read')
|
||||
->label('resourceType', RESOURCE_TYPE_DATABASES)
|
||||
->label('sdk', new Method(
|
||||
namespace: 'vectorDB',
|
||||
namespace: 'vectorsDB',
|
||||
group: 'transactions',
|
||||
name: 'getTransaction',
|
||||
description: '/docs/references/vectordb/get-transaction.md',
|
||||
description: '/docs/references/vectorsdb/get-transaction.md',
|
||||
auth: [AuthType::ADMIN, AuthType::KEY, AuthType::SESSION, AuthType::JWT],
|
||||
responses: [
|
||||
new SDKResponse(
|
||||
+5
-5
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Appwrite\Platform\Modules\Databases\Http\VectorDB\Transactions\Operations;
|
||||
namespace Appwrite\Platform\Modules\Databases\Http\VectorsDB\Transactions\Operations;
|
||||
|
||||
use Appwrite\Platform\Modules\Databases\Http\Databases\Transactions\Operations\Create as OperationsCreate;
|
||||
use Appwrite\SDK\AuthType;
|
||||
@@ -17,7 +17,7 @@ class Create extends OperationsCreate
|
||||
{
|
||||
public static function getName(): string
|
||||
{
|
||||
return 'createVectorDBOperations';
|
||||
return 'createVectorsDBOperations';
|
||||
}
|
||||
|
||||
protected function getResponseModel(): string
|
||||
@@ -29,16 +29,16 @@ class Create extends OperationsCreate
|
||||
{
|
||||
$this
|
||||
->setHttpMethod(self::HTTP_REQUEST_METHOD_POST)
|
||||
->setHttpPath('/v1/vectordb/transactions/:transactionId/operations')
|
||||
->setHttpPath('/v1/vectorsdb/transactions/:transactionId/operations')
|
||||
->desc('Create operations')
|
||||
->groups(['api', 'database', 'transactions'])
|
||||
->label('scope', 'documents.write')
|
||||
->label('resourceType', RESOURCE_TYPE_DATABASES)
|
||||
->label('sdk', new Method(
|
||||
namespace: 'vectorDB',
|
||||
namespace: 'vectorsDB',
|
||||
group: 'transactions',
|
||||
name: 'createOperations',
|
||||
description: '/docs/references/vectordb/create-operations.md',
|
||||
description: '/docs/references/vectorsdb/create-operations.md',
|
||||
auth: [AuthType::ADMIN, AuthType::KEY, AuthType::SESSION, AuthType::JWT],
|
||||
responses: [
|
||||
new SDKResponse(
|
||||
+5
-5
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Appwrite\Platform\Modules\Databases\Http\VectorDB\Transactions;
|
||||
namespace Appwrite\Platform\Modules\Databases\Http\VectorsDB\Transactions;
|
||||
|
||||
use Appwrite\Platform\Modules\Databases\Http\Databases\Transactions\Update as TransactionsUpdate;
|
||||
use Appwrite\SDK\AuthType;
|
||||
@@ -16,7 +16,7 @@ class Update extends TransactionsUpdate
|
||||
{
|
||||
public static function getName(): string
|
||||
{
|
||||
return 'updateVectorDBTransaction';
|
||||
return 'updateVectorsDBTransaction';
|
||||
}
|
||||
|
||||
protected function getResponseModel(): string
|
||||
@@ -28,16 +28,16 @@ class Update extends TransactionsUpdate
|
||||
{
|
||||
$this
|
||||
->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH)
|
||||
->setHttpPath('/v1/vectordb/transactions/:transactionId')
|
||||
->setHttpPath('/v1/vectorsdb/transactions/:transactionId')
|
||||
->desc('Update transaction')
|
||||
->groups(['api', 'database', 'transactions'])
|
||||
->label('scope', 'documents.write')
|
||||
->label('resourceType', RESOURCE_TYPE_DATABASES)
|
||||
->label('sdk', new Method(
|
||||
namespace: 'vectorDB',
|
||||
namespace: 'vectorsDB',
|
||||
group: 'transactions',
|
||||
name: 'updateTransaction',
|
||||
description: '/docs/references/vectordb/update-transaction.md',
|
||||
description: '/docs/references/vectorsdb/update-transaction.md',
|
||||
auth: [AuthType::ADMIN, AuthType::KEY, AuthType::SESSION, AuthType::JWT],
|
||||
responses: [
|
||||
new SDKResponse(
|
||||
+5
-5
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Appwrite\Platform\Modules\Databases\Http\VectorDB\Transactions;
|
||||
namespace Appwrite\Platform\Modules\Databases\Http\VectorsDB\Transactions;
|
||||
|
||||
use Appwrite\Platform\Modules\Databases\Http\Databases\Transactions\XList as TransactionsList;
|
||||
use Appwrite\SDK\AuthType;
|
||||
@@ -15,7 +15,7 @@ class XList extends TransactionsList
|
||||
{
|
||||
public static function getName(): string
|
||||
{
|
||||
return 'listVectorDBTransactions';
|
||||
return 'listVectorsDBTransactions';
|
||||
}
|
||||
|
||||
protected function getResponseModel(): string
|
||||
@@ -27,16 +27,16 @@ class XList extends TransactionsList
|
||||
{
|
||||
$this
|
||||
->setHttpMethod(self::HTTP_REQUEST_METHOD_GET)
|
||||
->setHttpPath('/v1/vectordb/transactions')
|
||||
->setHttpPath('/v1/vectorsdb/transactions')
|
||||
->desc('List transactions')
|
||||
->groups(['api', 'database', 'transactions'])
|
||||
->label('scope', 'documents.read')
|
||||
->label('resourceType', RESOURCE_TYPE_DATABASES)
|
||||
->label('sdk', new Method(
|
||||
namespace: 'vectorDB',
|
||||
namespace: 'vectorsDB',
|
||||
group: 'transactions',
|
||||
name: 'listTransactions',
|
||||
description: '/docs/references/vectordb/list-transactions.md',
|
||||
description: '/docs/references/vectorsdb/list-transactions.md',
|
||||
auth: [AuthType::ADMIN, AuthType::KEY, AuthType::SESSION, AuthType::JWT],
|
||||
responses: [
|
||||
new SDKResponse(
|
||||
+6
-6
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Appwrite\Platform\Modules\Databases\Http\VectorDB;
|
||||
namespace Appwrite\Platform\Modules\Databases\Http\VectorsDB;
|
||||
|
||||
use Appwrite\Platform\Modules\Databases\Http\Databases\Update as DatabaseUpdate;
|
||||
use Appwrite\SDK\AuthType;
|
||||
@@ -17,14 +17,14 @@ class Update extends DatabaseUpdate
|
||||
{
|
||||
public static function getName(): string
|
||||
{
|
||||
return 'updateVectorDBDatabase';
|
||||
return 'updateVectorsDBDatabase';
|
||||
}
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this
|
||||
->setHttpMethod(self::HTTP_REQUEST_METHOD_PUT)
|
||||
->setHttpPath('/v1/vectordb/:databaseId')
|
||||
->setHttpPath('/v1/vectorsdb/:databaseId')
|
||||
->desc('Update database')
|
||||
->groups(['api', 'database', 'schema'])
|
||||
->label('scope', 'databases.write')
|
||||
@@ -33,10 +33,10 @@ class Update extends DatabaseUpdate
|
||||
->label('audits.event', 'database.update')
|
||||
->label('audits.resource', 'database/{response.$id}')
|
||||
->label('sdk', new Method(
|
||||
namespace: 'vectorDB',
|
||||
group: 'vectordb',
|
||||
namespace: 'vectorsDB',
|
||||
group: 'vectorsdb',
|
||||
name: 'update',
|
||||
description: '/docs/references/vectordb/update.md',
|
||||
description: '/docs/references/vectorsdb/update.md',
|
||||
auth: [AuthType::ADMIN, AuthType::KEY],
|
||||
responses: [
|
||||
new SDKResponse(
|
||||
+8
-8
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Appwrite\Platform\Modules\Databases\Http\VectorDB\Usage;
|
||||
namespace Appwrite\Platform\Modules\Databases\Http\VectorsDB\Usage;
|
||||
|
||||
use Appwrite\Platform\Modules\Databases\Http\Databases\Usage\Get as DatabaseUsageGet;
|
||||
use Appwrite\SDK\AuthType;
|
||||
@@ -16,34 +16,34 @@ class Get extends DatabaseUsageGet
|
||||
{
|
||||
public static function getName(): string
|
||||
{
|
||||
return 'getVectorDBUsage';
|
||||
return 'getVectorsDBUsage';
|
||||
}
|
||||
|
||||
public function getResponseModel(): string
|
||||
{
|
||||
return UtopiaResponse::MODEL_USAGE_VECTORDB;
|
||||
return UtopiaResponse::MODEL_USAGE_VECTORSDBS;
|
||||
}
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this
|
||||
->setHttpMethod(self::HTTP_REQUEST_METHOD_GET)
|
||||
->setHttpPath('/v1/vectordb/:databaseId/usage')
|
||||
->desc('Get VectorDB usage stats')
|
||||
->setHttpPath('/v1/vectorsdb/:databaseId/usage')
|
||||
->desc('Get VectorsDB usage stats')
|
||||
->groups(['api', 'database', 'usage'])
|
||||
->label('scope', 'collections.read')
|
||||
->label('resourceType', RESOURCE_TYPE_DATABASES)
|
||||
->label('sdk', [
|
||||
new Method(
|
||||
namespace: 'vectorDB',
|
||||
namespace: 'vectorsDB',
|
||||
group: null,
|
||||
name: 'getUsage',
|
||||
description: '/docs/references/vectordb/get-database-usage.md',
|
||||
description: '/docs/references/vectorsdb/get-database-usage.md',
|
||||
auth: [AuthType::ADMIN],
|
||||
responses: [
|
||||
new SDKResponse(
|
||||
code: SwooleResponse::STATUS_CODE_OK,
|
||||
model: UtopiaResponse::MODEL_USAGE_VECTORDB,
|
||||
model: UtopiaResponse::MODEL_USAGE_VECTORSDBS,
|
||||
)
|
||||
],
|
||||
contentType: ContentType::JSON,
|
||||
+8
-8
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Appwrite\Platform\Modules\Databases\Http\VectorDB\Usage;
|
||||
namespace Appwrite\Platform\Modules\Databases\Http\VectorsDB\Usage;
|
||||
|
||||
use Appwrite\Platform\Modules\Databases\Http\Databases\Usage\XList as DatabaseUsageXList;
|
||||
use Appwrite\SDK\AuthType;
|
||||
@@ -15,34 +15,34 @@ class XList extends DatabaseUsageXList
|
||||
{
|
||||
public static function getName(): string
|
||||
{
|
||||
return 'listVectorDBUsage';
|
||||
return 'listVectorsDBUsage';
|
||||
}
|
||||
|
||||
public function getResponseModel(): string
|
||||
{
|
||||
return UtopiaResponse::MODEL_USAGE_VECTORDBS;
|
||||
return UtopiaResponse::MODEL_USAGE_VECTORSDBSS;
|
||||
}
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this
|
||||
->setHttpMethod(self::HTTP_REQUEST_METHOD_GET)
|
||||
->setHttpPath('/v1/vectordb/usage')
|
||||
->desc('Get VectorDB usage stats')
|
||||
->setHttpPath('/v1/vectorsdb/usage')
|
||||
->desc('Get VectorsDB usage stats')
|
||||
->groups(['api', 'database', 'usage'])
|
||||
->label('scope', 'collections.read')
|
||||
->label('resourceType', RESOURCE_TYPE_DATABASES)
|
||||
->label('sdk', [
|
||||
new Method(
|
||||
namespace: 'vectorDB',
|
||||
namespace: 'vectorsDB',
|
||||
group: null,
|
||||
name: 'listUsage',
|
||||
description: '/docs/references/vectordb/list-usage.md',
|
||||
description: '/docs/references/vectorsdb/list-usage.md',
|
||||
auth: [AuthType::ADMIN],
|
||||
responses: [
|
||||
new SDKResponse(
|
||||
code: SwooleResponse::STATUS_CODE_OK,
|
||||
model: UtopiaResponse::MODEL_USAGE_VECTORDBS,
|
||||
model: UtopiaResponse::MODEL_USAGE_VECTORSDBSS,
|
||||
)
|
||||
],
|
||||
contentType: ContentType::JSON
|
||||
+6
-6
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Appwrite\Platform\Modules\Databases\Http\VectorDB;
|
||||
namespace Appwrite\Platform\Modules\Databases\Http\VectorsDB;
|
||||
|
||||
use Appwrite\Platform\Modules\Databases\Http\Databases\XList as DatabaseXList;
|
||||
use Appwrite\SDK\AuthType;
|
||||
@@ -17,23 +17,23 @@ class XList extends DatabaseXList
|
||||
{
|
||||
public static function getName(): string
|
||||
{
|
||||
return 'listVectorDBDatabases';
|
||||
return 'listVectorsDBDatabases';
|
||||
}
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this
|
||||
->setHttpMethod(self::HTTP_REQUEST_METHOD_GET)
|
||||
->setHttpPath('/v1/vectordb')
|
||||
->setHttpPath('/v1/vectorsdb')
|
||||
->desc('List databases')
|
||||
->groups(['api', 'database'])
|
||||
->label('scope', 'databases.read')
|
||||
->label('resourceType', RESOURCE_TYPE_DATABASES)
|
||||
->label('sdk', new Method(
|
||||
namespace: 'vectorDB',
|
||||
group: 'vectordb',
|
||||
namespace: 'vectorsDB',
|
||||
group: 'vectorsdb',
|
||||
name: 'list',
|
||||
description: '/docs/references/vectordb/list.md',
|
||||
description: '/docs/references/vectorsdb/list.md',
|
||||
auth: [AuthType::ADMIN, AuthType::KEY],
|
||||
responses: [
|
||||
new SDKResponse(
|
||||
@@ -6,7 +6,7 @@ use Appwrite\Platform\Modules\Databases\Http\Init\Timeout;
|
||||
use Appwrite\Platform\Modules\Databases\Services\Registry\DocumentsDB as DocumentsDBRegistry;
|
||||
use Appwrite\Platform\Modules\Databases\Services\Registry\Legacy as LegacyRegistry;
|
||||
use Appwrite\Platform\Modules\Databases\Services\Registry\TablesDB as TablesDBDBRegistry;
|
||||
use Appwrite\Platform\Modules\Databases\Services\Registry\VectorDB as VectorDBRegistry;
|
||||
use Appwrite\Platform\Modules\Databases\Services\Registry\VectorsDB as VectorsDBRegistry;
|
||||
use Utopia\Platform\Service;
|
||||
|
||||
class Http extends Service
|
||||
@@ -21,7 +21,7 @@ class Http extends Service
|
||||
LegacyRegistry::class,
|
||||
TablesDBDBRegistry::class,
|
||||
DocumentsDBRegistry::class,
|
||||
VectorDBRegistry::class
|
||||
VectorsDBRegistry::class
|
||||
] as $registrar) {
|
||||
new $registrar($this);
|
||||
}
|
||||
|
||||
+35
-35
@@ -2,43 +2,43 @@
|
||||
|
||||
namespace Appwrite\Platform\Modules\Databases\Services\Registry;
|
||||
|
||||
use Appwrite\Platform\Modules\Databases\Http\VectorDB\Collections\Create as CreateCollection;
|
||||
use Appwrite\Platform\Modules\Databases\Http\VectorDB\Collections\Delete as DeleteCollection;
|
||||
use Appwrite\Platform\Modules\Databases\Http\VectorDB\Collections\Documents\Bulk\Delete as DeleteDocuments;
|
||||
use Appwrite\Platform\Modules\Databases\Http\VectorDB\Collections\Documents\Bulk\Update as UpdateDocuments;
|
||||
use Appwrite\Platform\Modules\Databases\Http\VectorDB\Collections\Documents\Bulk\Upsert as UpsertDocuments;
|
||||
use Appwrite\Platform\Modules\Databases\Http\VectorDB\Collections\Documents\Create as CreateDocument;
|
||||
use Appwrite\Platform\Modules\Databases\Http\VectorDB\Collections\Documents\Delete as DeleteDocument;
|
||||
use Appwrite\Platform\Modules\Databases\Http\VectorDB\Collections\Documents\Get as GetDocument;
|
||||
use Appwrite\Platform\Modules\Databases\Http\VectorDB\Collections\Documents\Update as UpdateDocument;
|
||||
use Appwrite\Platform\Modules\Databases\Http\VectorDB\Collections\Documents\Upsert as UpsertDocument;
|
||||
use Appwrite\Platform\Modules\Databases\Http\VectorDB\Collections\Documents\XList as ListDocuments;
|
||||
use Appwrite\Platform\Modules\Databases\Http\VectorDB\Collections\Get as GetCollection;
|
||||
use Appwrite\Platform\Modules\Databases\Http\VectorDB\Collections\Indexes\Create as CreateIndex;
|
||||
use Appwrite\Platform\Modules\Databases\Http\VectorDB\Collections\Indexes\Delete as DeleteIndex;
|
||||
use Appwrite\Platform\Modules\Databases\Http\VectorDB\Collections\Indexes\Get as GetIndex;
|
||||
use Appwrite\Platform\Modules\Databases\Http\VectorDB\Collections\Indexes\XList as ListIndexes;
|
||||
use Appwrite\Platform\Modules\Databases\Http\VectorDB\Collections\Logs\XList as ListCollectionLogs;
|
||||
use Appwrite\Platform\Modules\Databases\Http\VectorDB\Collections\Update as UpdateCollection;
|
||||
use Appwrite\Platform\Modules\Databases\Http\VectorDB\Collections\Usage\Get as GetCollectionUsage;
|
||||
use Appwrite\Platform\Modules\Databases\Http\VectorDB\Collections\XList as ListCollections;
|
||||
use Appwrite\Platform\Modules\Databases\Http\VectorDB\Create as CreateVectorDatabase;
|
||||
use Appwrite\Platform\Modules\Databases\Http\VectorDB\Delete as DeleteVectorDatabase;
|
||||
use Appwrite\Platform\Modules\Databases\Http\VectorDB\Embeddings\Text\Create as CreateTextEmbeddings;
|
||||
use Appwrite\Platform\Modules\Databases\Http\VectorDB\Get as GetVectorDatabase;
|
||||
use Appwrite\Platform\Modules\Databases\Http\VectorDB\Transactions\Create as CreateTransaction;
|
||||
use Appwrite\Platform\Modules\Databases\Http\VectorDB\Transactions\Delete as DeleteTransaction;
|
||||
use Appwrite\Platform\Modules\Databases\Http\VectorDB\Transactions\Get as GetTransaction;
|
||||
use Appwrite\Platform\Modules\Databases\Http\VectorDB\Transactions\Operations\Create as CreateOperations;
|
||||
use Appwrite\Platform\Modules\Databases\Http\VectorDB\Transactions\Update as UpdateTransaction;
|
||||
use Appwrite\Platform\Modules\Databases\Http\VectorDB\Transactions\XList as ListTransactions;
|
||||
use Appwrite\Platform\Modules\Databases\Http\VectorDB\Update as UpdateVectorDatabase;
|
||||
use Appwrite\Platform\Modules\Databases\Http\VectorDB\Usage\Get as GetVectorDatabaseUsage;
|
||||
use Appwrite\Platform\Modules\Databases\Http\VectorDB\Usage\XList as ListVectorDatabaseUsage;
|
||||
use Appwrite\Platform\Modules\Databases\Http\VectorDB\XList as ListVectorDatabases;
|
||||
use Appwrite\Platform\Modules\Databases\Http\VectorsDB\Collections\Create as CreateCollection;
|
||||
use Appwrite\Platform\Modules\Databases\Http\VectorsDB\Collections\Delete as DeleteCollection;
|
||||
use Appwrite\Platform\Modules\Databases\Http\VectorsDB\Collections\Documents\Bulk\Delete as DeleteDocuments;
|
||||
use Appwrite\Platform\Modules\Databases\Http\VectorsDB\Collections\Documents\Bulk\Update as UpdateDocuments;
|
||||
use Appwrite\Platform\Modules\Databases\Http\VectorsDB\Collections\Documents\Bulk\Upsert as UpsertDocuments;
|
||||
use Appwrite\Platform\Modules\Databases\Http\VectorsDB\Collections\Documents\Create as CreateDocument;
|
||||
use Appwrite\Platform\Modules\Databases\Http\VectorsDB\Collections\Documents\Delete as DeleteDocument;
|
||||
use Appwrite\Platform\Modules\Databases\Http\VectorsDB\Collections\Documents\Get as GetDocument;
|
||||
use Appwrite\Platform\Modules\Databases\Http\VectorsDB\Collections\Documents\Update as UpdateDocument;
|
||||
use Appwrite\Platform\Modules\Databases\Http\VectorsDB\Collections\Documents\Upsert as UpsertDocument;
|
||||
use Appwrite\Platform\Modules\Databases\Http\VectorsDB\Collections\Documents\XList as ListDocuments;
|
||||
use Appwrite\Platform\Modules\Databases\Http\VectorsDB\Collections\Get as GetCollection;
|
||||
use Appwrite\Platform\Modules\Databases\Http\VectorsDB\Collections\Indexes\Create as CreateIndex;
|
||||
use Appwrite\Platform\Modules\Databases\Http\VectorsDB\Collections\Indexes\Delete as DeleteIndex;
|
||||
use Appwrite\Platform\Modules\Databases\Http\VectorsDB\Collections\Indexes\Get as GetIndex;
|
||||
use Appwrite\Platform\Modules\Databases\Http\VectorsDB\Collections\Indexes\XList as ListIndexes;
|
||||
use Appwrite\Platform\Modules\Databases\Http\VectorsDB\Collections\Logs\XList as ListCollectionLogs;
|
||||
use Appwrite\Platform\Modules\Databases\Http\VectorsDB\Collections\Update as UpdateCollection;
|
||||
use Appwrite\Platform\Modules\Databases\Http\VectorsDB\Collections\Usage\Get as GetCollectionUsage;
|
||||
use Appwrite\Platform\Modules\Databases\Http\VectorsDB\Collections\XList as ListCollections;
|
||||
use Appwrite\Platform\Modules\Databases\Http\VectorsDB\Create as CreateVectorDatabase;
|
||||
use Appwrite\Platform\Modules\Databases\Http\VectorsDB\Delete as DeleteVectorDatabase;
|
||||
use Appwrite\Platform\Modules\Databases\Http\VectorsDB\Embeddings\Text\Create as CreateTextEmbeddings;
|
||||
use Appwrite\Platform\Modules\Databases\Http\VectorsDB\Get as GetVectorDatabase;
|
||||
use Appwrite\Platform\Modules\Databases\Http\VectorsDB\Transactions\Create as CreateTransaction;
|
||||
use Appwrite\Platform\Modules\Databases\Http\VectorsDB\Transactions\Delete as DeleteTransaction;
|
||||
use Appwrite\Platform\Modules\Databases\Http\VectorsDB\Transactions\Get as GetTransaction;
|
||||
use Appwrite\Platform\Modules\Databases\Http\VectorsDB\Transactions\Operations\Create as CreateOperations;
|
||||
use Appwrite\Platform\Modules\Databases\Http\VectorsDB\Transactions\Update as UpdateTransaction;
|
||||
use Appwrite\Platform\Modules\Databases\Http\VectorsDB\Transactions\XList as ListTransactions;
|
||||
use Appwrite\Platform\Modules\Databases\Http\VectorsDB\Update as UpdateVectorDatabase;
|
||||
use Appwrite\Platform\Modules\Databases\Http\VectorsDB\Usage\Get as GetVectorDatabaseUsage;
|
||||
use Appwrite\Platform\Modules\Databases\Http\VectorsDB\Usage\XList as ListVectorDatabaseUsage;
|
||||
use Appwrite\Platform\Modules\Databases\Http\VectorsDB\XList as ListVectorDatabases;
|
||||
use Utopia\Platform\Service;
|
||||
|
||||
class VectorDB extends Base
|
||||
class VectorsDB extends Base
|
||||
{
|
||||
protected function register(Service $service): void
|
||||
{
|
||||
@@ -565,7 +565,7 @@ class Deletes extends Action
|
||||
'database' => $document->getAttribute('database')
|
||||
]),
|
||||
...$dbForProject->find('databases', [
|
||||
Query::equal('type', [DATABASE_TYPE_DOCUMENTSDB, DATABASE_TYPE_VECTORDB]),
|
||||
Query::equal('type', [DATABASE_TYPE_DOCUMENTSDB, DATABASE_TYPE_VECTORSDBS]),
|
||||
Query::limit(5000),
|
||||
]),
|
||||
];
|
||||
|
||||
@@ -323,8 +323,8 @@ class Migrations extends Action
|
||||
METRIC_DATABASES_OPERATIONS_WRITES,
|
||||
METRIC_DATABASES_OPERATIONS_READS_DOCUMENTSDB,
|
||||
METRIC_DATABASES_OPERATIONS_WRITES_DOCUMENTSDB,
|
||||
METRIC_DATABASES_OPERATIONS_READS_VECTORDB,
|
||||
METRIC_DATABASES_OPERATIONS_WRITES_VECTORDB,
|
||||
METRIC_DATABASES_OPERATIONS_READS_VECTORSDBS,
|
||||
METRIC_DATABASES_OPERATIONS_WRITES_VECTORSDBS,
|
||||
METRIC_NETWORK_REQUESTS,
|
||||
METRIC_NETWORK_INBOUND,
|
||||
METRIC_NETWORK_OUTBOUND,
|
||||
|
||||
@@ -112,7 +112,7 @@ class StatsResources extends Action
|
||||
|
||||
$databases = $dbForProject->count('databases', [Query::equal('type', [DATABASE_TYPE_LEGACY, DATABASE_TYPE_TABLESDB])]);
|
||||
$documentsdb = $dbForProject->count('databases', [Query::equal('type', [DATABASE_TYPE_DOCUMENTSDB])]);
|
||||
$vectordb = $dbForProject->count('databases', [Query::equal('type', [DATABASE_TYPE_VECTORDB])]);
|
||||
$vectorsdb = $dbForProject->count('databases', [Query::equal('type', [DATABASE_TYPE_VECTORSDBS])]);
|
||||
$buckets = $dbForProject->count('buckets');
|
||||
$users = $dbForProject->count('users');
|
||||
|
||||
@@ -148,7 +148,7 @@ class StatsResources extends Action
|
||||
$metrics = [
|
||||
METRIC_DATABASES => $databases,
|
||||
METRIC_DATABASES_DOCUMENTSDB => $documentsdb,
|
||||
METRIC_DATABASES_VECTORDB => $vectordb,
|
||||
METRIC_DATABASES_VECTORSDBS => $vectorsdb,
|
||||
METRIC_BUCKETS => $buckets,
|
||||
METRIC_USERS => $users,
|
||||
METRIC_FUNCTIONS => $functions,
|
||||
@@ -256,7 +256,7 @@ class StatsResources extends Action
|
||||
$totalDocumentsDocumentsdb = 0;
|
||||
$totalDatabaseStorageDocumentsdb = 0;
|
||||
|
||||
// vectordb
|
||||
// vectorsdb
|
||||
$totalCollectionsVectordb = 0;
|
||||
$totalDocumentsVectordb = 0;
|
||||
$totalDatabaseStorageVectordb = 0;
|
||||
@@ -282,7 +282,7 @@ class StatsResources extends Action
|
||||
$totalDocumentsDocumentsdb += $documents;
|
||||
$totalCollectionsDocumentsdb += $collections;
|
||||
break;
|
||||
case DATABASE_TYPE_VECTORDB:
|
||||
case DATABASE_TYPE_VECTORSDBS:
|
||||
$totalDatabaseStorageVectordb += $storage;
|
||||
$totalDocumentsVectordb += $documents;
|
||||
$totalCollectionsVectordb += $collections;
|
||||
@@ -302,9 +302,9 @@ class StatsResources extends Action
|
||||
$this->createStatsDocuments($region, METRIC_DOCUMENTS_DOCUMENTSDB, $totalDocumentsDocumentsdb);
|
||||
$this->createStatsDocuments($region, METRIC_DATABASES_STORAGE_DOCUMENTSDB, $totalDatabaseStorageDocumentsdb);
|
||||
|
||||
$this->createStatsDocuments($region, METRIC_COLLECTIONS_VECTORDB, $totalCollectionsVectordb);
|
||||
$this->createStatsDocuments($region, METRIC_DOCUMENTS_VECTORDB, $totalDocumentsVectordb);
|
||||
$this->createStatsDocuments($region, METRIC_DATABASES_STORAGE_VECTORDB, $totalDatabaseStorageVectordb);
|
||||
$this->createStatsDocuments($region, METRIC_COLLECTIONS_VECTORSDBS, $totalCollectionsVectordb);
|
||||
$this->createStatsDocuments($region, METRIC_DOCUMENTS_VECTORSDBS, $totalDocumentsVectordb);
|
||||
$this->createStatsDocuments($region, METRIC_DATABASES_STORAGE_VECTORSDBS, $totalDatabaseStorageVectordb);
|
||||
}
|
||||
protected function countForCollections(Database $dbForProject, Database $dbForDatabases, Document $database, string $region): array
|
||||
{
|
||||
|
||||
@@ -48,7 +48,7 @@ class StatsUsage extends Action
|
||||
protected array $skipBaseMetrics = [
|
||||
METRIC_DATABASES => true,
|
||||
METRIC_DATABASES_DOCUMENTSDB => true,
|
||||
METRIC_DATABASES_VECTORDB => true,
|
||||
METRIC_DATABASES_VECTORSDBS => true,
|
||||
METRIC_BUCKETS => true,
|
||||
METRIC_USERS => true,
|
||||
METRIC_FUNCTIONS => true,
|
||||
@@ -70,11 +70,11 @@ class StatsUsage extends Action
|
||||
METRIC_DOCUMENTS => true,
|
||||
METRIC_COLLECTIONS_DOCUMENTSDB => true,
|
||||
METRIC_DOCUMENTS_DOCUMENTSDB => true,
|
||||
METRIC_COLLECTIONS_VECTORDB => true,
|
||||
METRIC_DOCUMENTS_VECTORDB => true,
|
||||
METRIC_COLLECTIONS_VECTORSDBS => true,
|
||||
METRIC_DOCUMENTS_VECTORSDBS => true,
|
||||
METRIC_DATABASES_STORAGE => true,
|
||||
METRIC_DATABASES_STORAGE_DOCUMENTSDB => true,
|
||||
METRIC_DATABASES_STORAGE_VECTORDB => true,
|
||||
METRIC_DATABASES_STORAGE_VECTORSDBS => true,
|
||||
];
|
||||
|
||||
/**
|
||||
|
||||
@@ -367,7 +367,7 @@ abstract class Format
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'vectorDB':
|
||||
case 'vectorsDB':
|
||||
switch ($method) {
|
||||
case 'getUsage':
|
||||
case 'listUsage':
|
||||
@@ -380,7 +380,7 @@ abstract class Format
|
||||
case 'createIndex':
|
||||
switch ($param) {
|
||||
case 'type':
|
||||
return 'VectorDBIndexType';
|
||||
return 'VectorsDBIndexType';
|
||||
case 'orders':
|
||||
return 'OrderBy';
|
||||
}
|
||||
@@ -669,7 +669,7 @@ abstract class Format
|
||||
break;
|
||||
case 'databases':
|
||||
case 'documentsDB':
|
||||
case 'vectorDB':
|
||||
case 'vectorsDB':
|
||||
switch ($method) {
|
||||
case 'getUsage':
|
||||
case 'listUsage':
|
||||
|
||||
@@ -34,8 +34,8 @@ class Response extends SwooleResponse
|
||||
public const MODEL_USAGE_DATABASE = 'usageDatabase';
|
||||
public const MODEL_USAGE_DOCUMENTSDBS = 'usageDocumentsDBs';
|
||||
public const MODEL_USAGE_DOCUMENTSDB = 'usageDocumentsDB';
|
||||
public const MODEL_USAGE_VECTORDBS = 'usageVectorDBs';
|
||||
public const MODEL_USAGE_VECTORDB = 'usageVectorDB';
|
||||
public const MODEL_USAGE_VECTORSDBSS = 'usageVectorsDBs';
|
||||
public const MODEL_USAGE_VECTORSDBS = 'usageVectorsDB';
|
||||
public const MODEL_USAGE_TABLE = 'usageTable';
|
||||
public const MODEL_USAGE_COLLECTION = 'usageCollection';
|
||||
public const MODEL_USAGE_USERS = 'usageUsers';
|
||||
@@ -52,8 +52,8 @@ class Response extends SwooleResponse
|
||||
public const MODEL_DATABASE_LIST = 'databaseList';
|
||||
public const MODEL_COLLECTION = 'collection';
|
||||
public const MODEL_COLLECTION_LIST = 'collectionList';
|
||||
public const MODEL_VECTORDB_COLLECTION = 'vectordbCollection';
|
||||
public const MODEL_VECTORDB_COLLECTION_LIST = 'vectordbCollectionList';
|
||||
public const MODEL_VECTORSDBS_COLLECTION = 'vectorsdbCollection';
|
||||
public const MODEL_VECTORSDBS_COLLECTION_LIST = 'vectorsdbCollectionList';
|
||||
public const MODEL_EMBEDDING = 'embedding';
|
||||
public const MODEL_EMBEDDING_LIST = 'embeddingList';
|
||||
public const MODEL_TABLE = 'table';
|
||||
|
||||
@@ -267,81 +267,81 @@ class UsageProject extends Model
|
||||
'default' => 0,
|
||||
'example' => 0,
|
||||
])
|
||||
// VectorDB aggregates
|
||||
->addRule('vectordbDatabasesTotal', [
|
||||
// VectorsDB aggregates
|
||||
->addRule('vectorsdbDatabasesTotal', [
|
||||
'type' => self::TYPE_INTEGER,
|
||||
'description' => 'Total aggregated number of VectorDB databases.',
|
||||
'description' => 'Total aggregated number of VectorsDB databases.',
|
||||
'default' => 0,
|
||||
'example' => 0,
|
||||
])
|
||||
->addRule('vectordbCollectionsTotal', [
|
||||
->addRule('vectorsdbCollectionsTotal', [
|
||||
'type' => self::TYPE_INTEGER,
|
||||
'description' => 'Total aggregated number of VectorDB collections.',
|
||||
'description' => 'Total aggregated number of VectorsDB collections.',
|
||||
'default' => 0,
|
||||
'example' => 0,
|
||||
])
|
||||
->addRule('vectordbDocumentsTotal', [
|
||||
->addRule('vectorsdbDocumentsTotal', [
|
||||
'type' => self::TYPE_INTEGER,
|
||||
'description' => 'Total aggregated number of VectorDB documents.',
|
||||
'description' => 'Total aggregated number of VectorsDB documents.',
|
||||
'default' => 0,
|
||||
'example' => 0,
|
||||
])
|
||||
->addRule('vectordbDatabasesStorageTotal', [
|
||||
->addRule('vectorsdbDatabasesStorageTotal', [
|
||||
'type' => self::TYPE_INTEGER,
|
||||
'description' => 'Total aggregated VectorDB storage (bytes).',
|
||||
'description' => 'Total aggregated VectorsDB storage (bytes).',
|
||||
'default' => 0,
|
||||
'example' => 0,
|
||||
])
|
||||
->addRule('vectordbDatabasesReadsTotal', [
|
||||
->addRule('vectorsdbDatabasesReadsTotal', [
|
||||
'type' => self::TYPE_INTEGER,
|
||||
'description' => 'Total aggregated number of VectorDB reads.',
|
||||
'description' => 'Total aggregated number of VectorsDB reads.',
|
||||
'default' => 0,
|
||||
'example' => 0,
|
||||
])
|
||||
->addRule('vectordbDatabasesWritesTotal', [
|
||||
->addRule('vectorsdbDatabasesWritesTotal', [
|
||||
'type' => self::TYPE_INTEGER,
|
||||
'description' => 'Total aggregated number of VectorDB writes.',
|
||||
'description' => 'Total aggregated number of VectorsDB writes.',
|
||||
'default' => 0,
|
||||
'example' => 0,
|
||||
])
|
||||
->addRule('vectordbDatabases', [
|
||||
->addRule('vectorsdbDatabases', [
|
||||
'type' => Response::MODEL_METRIC,
|
||||
'description' => 'Aggregated VectorDB databases per period.',
|
||||
'description' => 'Aggregated VectorsDB databases per period.',
|
||||
'default' => [],
|
||||
'example' => [],
|
||||
'array' => true
|
||||
])
|
||||
->addRule('vectordbCollections', [
|
||||
->addRule('vectorsdbCollections', [
|
||||
'type' => Response::MODEL_METRIC,
|
||||
'description' => 'Aggregated VectorDB collections per period.',
|
||||
'description' => 'Aggregated VectorsDB collections per period.',
|
||||
'default' => [],
|
||||
'example' => [],
|
||||
'array' => true
|
||||
])
|
||||
->addRule('vectordbDocuments', [
|
||||
->addRule('vectorsdbDocuments', [
|
||||
'type' => Response::MODEL_METRIC,
|
||||
'description' => 'Aggregated VectorDB documents per period.',
|
||||
'description' => 'Aggregated VectorsDB documents per period.',
|
||||
'default' => [],
|
||||
'example' => [],
|
||||
'array' => true
|
||||
])
|
||||
->addRule('vectordbDatabasesStorage', [
|
||||
->addRule('vectorsdbDatabasesStorage', [
|
||||
'type' => Response::MODEL_METRIC,
|
||||
'description' => 'Aggregated VectorDB storage per period.',
|
||||
'description' => 'Aggregated VectorsDB storage per period.',
|
||||
'default' => [],
|
||||
'example' => [],
|
||||
'array' => true
|
||||
])
|
||||
->addRule('vectordbDatabasesReads', [
|
||||
->addRule('vectorsdbDatabasesReads', [
|
||||
'type' => Response::MODEL_METRIC,
|
||||
'description' => 'Aggregated VectorDB reads per period.',
|
||||
'description' => 'Aggregated VectorsDB reads per period.',
|
||||
'default' => [],
|
||||
'example' => [],
|
||||
'array' => true
|
||||
])
|
||||
->addRule('vectordbDatabasesWrites', [
|
||||
->addRule('vectorsdbDatabasesWrites', [
|
||||
'type' => Response::MODEL_METRIC,
|
||||
'description' => 'Aggregated VectorDB writes per period.',
|
||||
'description' => 'Aggregated VectorsDB writes per period.',
|
||||
'default' => [],
|
||||
'example' => [],
|
||||
'array' => true
|
||||
|
||||
+3
-3
@@ -5,7 +5,7 @@ namespace Appwrite\Utopia\Response\Model;
|
||||
use Appwrite\Utopia\Response;
|
||||
use Appwrite\Utopia\Response\Model;
|
||||
|
||||
class UsageVectorDB extends Model
|
||||
class UsageVectorsDB extends Model
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
@@ -86,11 +86,11 @@ class UsageVectorDB extends Model
|
||||
|
||||
public function getName(): string
|
||||
{
|
||||
return 'UsageVectorDB';
|
||||
return 'UsageVectorsDB';
|
||||
}
|
||||
|
||||
public function getType(): string
|
||||
{
|
||||
return Response::MODEL_USAGE_VECTORDB;
|
||||
return Response::MODEL_USAGE_VECTORSDBS;
|
||||
}
|
||||
}
|
||||
+4
-4
@@ -5,7 +5,7 @@ namespace Appwrite\Utopia\Response\Model;
|
||||
use Appwrite\Utopia\Response;
|
||||
use Appwrite\Utopia\Response\Model;
|
||||
|
||||
class UsageVectorDBs extends Model
|
||||
class UsageVectorsDBs extends Model
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
@@ -18,7 +18,7 @@ class UsageVectorDBs extends Model
|
||||
])
|
||||
->addRule('databasesTotal', [
|
||||
'type' => self::TYPE_INTEGER,
|
||||
'description' => 'Total aggregated number of VectorDB databases.',
|
||||
'description' => 'Total aggregated number of VectorsDB databases.',
|
||||
'default' => 0,
|
||||
'example' => 0,
|
||||
])
|
||||
@@ -99,11 +99,11 @@ class UsageVectorDBs extends Model
|
||||
|
||||
public function getName(): string
|
||||
{
|
||||
return 'UsageVectorDBs';
|
||||
return 'UsageVectorsDBs';
|
||||
}
|
||||
|
||||
public function getType(): string
|
||||
{
|
||||
return Response::MODEL_USAGE_VECTORDBS;
|
||||
return Response::MODEL_USAGE_VECTORSDBSS;
|
||||
}
|
||||
}
|
||||
+3
-3
@@ -4,7 +4,7 @@ namespace Appwrite\Utopia\Response\Model;
|
||||
|
||||
use Appwrite\Utopia\Response;
|
||||
|
||||
class VectorDBCollection extends Collection
|
||||
class VectorsDBCollection extends Collection
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
@@ -31,11 +31,11 @@ class VectorDBCollection extends Collection
|
||||
|
||||
public function getName(): string
|
||||
{
|
||||
return 'VectorDB Collection';
|
||||
return 'VectorsDB Collection';
|
||||
}
|
||||
|
||||
public function getType(): string
|
||||
{
|
||||
return Response::MODEL_VECTORDB_COLLECTION;
|
||||
return Response::MODEL_VECTORSDBS_COLLECTION;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user