From 2a88341edc0619cc4db1ac02a42cbc9c9ec228ff Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Fri, 28 Nov 2025 02:33:13 +1300 Subject: [PATCH 01/20] Add attributes + indexes params --- .../Http/Databases/Collections/Action.php | 60 +++++ .../Http/Databases/Collections/Create.php | 232 +++++++++++++++++- .../Databases/Http/TablesDB/Tables/Create.php | 4 + .../Utopia/Database/Validator/Attributes.php | 211 ++++++++++++++++ .../Utopia/Database/Validator/Indexes.php | 190 ++++++++++++++ 5 files changed, 694 insertions(+), 3 deletions(-) create mode 100644 src/Appwrite/Utopia/Database/Validator/Attributes.php create mode 100644 src/Appwrite/Utopia/Database/Validator/Indexes.php diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Action.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Action.php index b22119fad1..a148e23845 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Action.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Action.php @@ -105,4 +105,64 @@ abstract class Action extends UtopiaAction ? Exception::COLLECTION_LIMIT_EXCEEDED : Exception::TABLE_LIMIT_EXCEEDED; } + + /** + * Get the appropriate format unsupported exception. + */ + protected function getFormatUnsupportedException(): string + { + return $this->isCollectionsAPI() + ? Exception::ATTRIBUTE_FORMAT_UNSUPPORTED + : Exception::COLUMN_FORMAT_UNSUPPORTED; + } + + /** + * Get the correct default unsupported message. + */ + protected function getDefaultUnsupportedException(): string + { + return $this->isCollectionsAPI() + ? Exception::ATTRIBUTE_DEFAULT_UNSUPPORTED + : Exception::COLUMN_DEFAULT_UNSUPPORTED; + } + + /** + * Get the appropriate parent level not found exception. + */ + protected function getParentNotFoundException(): string + { + return $this->isCollectionsAPI() + ? Exception::COLLECTION_NOT_FOUND + : Exception::TABLE_NOT_FOUND; + } + + /** + * Get the correct invalid structure message. + */ + protected function getStructureException(): string + { + return $this->isCollectionsAPI() + ? Exception::DOCUMENT_INVALID_STRUCTURE + : Exception::ROW_INVALID_STRUCTURE; + } + + /** + * Get the exception for unknown attribute/column in index. + */ + protected function getParentUnknownException(): string + { + return $this->isCollectionsAPI() + ? Exception::ATTRIBUTE_UNKNOWN + : Exception::COLUMN_UNKNOWN; + } + + /** + * Get the exception for invalid attribute/column type in index. + */ + protected function getParentInvalidTypeException(): string + { + return $this->isCollectionsAPI() + ? Exception::ATTRIBUTE_TYPE_INVALID + : Exception::COLUMN_TYPE_INVALID; + } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Create.php index 922cc45428..caa80c74d2 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Create.php @@ -9,7 +9,9 @@ use Appwrite\SDK\ContentType; use Appwrite\SDK\Deprecated; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; +use Appwrite\Utopia\Database\Validator\Attributes as AttributesValidator; use Appwrite\Utopia\Database\Validator\CustomId; +use Appwrite\Utopia\Database\Validator\Indexes as IndexesValidator; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Database; use Utopia\Database\Document; @@ -17,10 +19,12 @@ use Utopia\Database\Exception\Duplicate as DuplicateException; use Utopia\Database\Exception\Index as IndexException; use Utopia\Database\Exception\Limit as LimitException; use Utopia\Database\Exception\NotFound as NotFoundException; +use Utopia\Database\Exception\Structure as StructureException; use Utopia\Database\Helpers\ID; use Utopia\Database\Helpers\Permission; use Utopia\Database\Validator\Authorization; use Utopia\Database\Validator\Permissions; +use Utopia\Database\Validator\Structure; use Utopia\Database\Validator\UID; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\Boolean; @@ -75,13 +79,15 @@ class Create extends Action ->param('permissions', null, new Nullable(new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE)), 'An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).', true) ->param('documentSecurity', false, new Boolean(true), 'Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https://appwrite.io/docs/permissions).', true) ->param('enabled', true, new Boolean(), 'Is collection enabled? When set to \'disabled\', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.', true) + ->param('attributes', [], new AttributesValidator(), 'Array of attribute definitions to create. Each attribute should contain: key (string), type (string: string, integer, float, boolean, datetime, relationship), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.', true) + ->param('indexes', [], new IndexesValidator(), 'Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of attribute keys), orders (array of ASC/DESC, optional), and lengths (array of integers, optional).', true) ->inject('response') ->inject('dbForProject') ->inject('queueForEvents') ->callback($this->action(...)); } - public function action(string $databaseId, string $collectionId, string $name, ?array $permissions, bool $documentSecurity, bool $enabled, UtopiaResponse $response, Database $dbForProject, Event $queueForEvents): void + public function action(string $databaseId, string $collectionId, string $name, ?array $permissions, bool $documentSecurity, bool $enabled, array $attributes, array $indexes, UtopiaResponse $response, Database $dbForProject, Event $queueForEvents): void { $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); @@ -113,20 +119,53 @@ class Create extends Action throw new Exception(Exception::DATABASE_NOT_FOUND); } + $collectionAttributes = []; + $attributeDocuments = []; + foreach ($attributes as $attributeDef) { + $attrDoc = $this->buildAttributeDocument($database, $collection, $attributeDef, $dbForProject); + $collectionAttributes[] = $attrDoc['collection']; + $attributeDocuments[] = $attrDoc['document']; + } + + $collectionIndexes = []; + $indexDocuments = []; + foreach ($indexes as $indexDef) { + $idxDoc = $this->buildIndexDocument($database, $collection, $indexDef, $collectionAttributes); + $collectionIndexes[] = $idxDoc['collection']; + $indexDocuments[] = $idxDoc['document']; + } + try { $dbForProject->createCollection( id: 'database_' . $database->getSequence() . '_collection_' . $collection->getSequence(), + attributes: $collectionAttributes, + indexes: $collectionIndexes, permissions: $permissions, documentSecurity: $documentSecurity ); } catch (DuplicateException) { throw new Exception($this->getDuplicateException()); - } catch (IndexException) { - throw new Exception($this->getInvalidIndexException()); + } catch (IndexException $e) { + throw new Exception($this->getInvalidIndexException(), $e->getMessage()); } catch (LimitException) { throw new Exception($this->getLimitException()); } + // Create documents in attributes and indexes collections + try { + if (!empty($attributeDocuments)) { + $dbForProject->createDocuments('attributes', $attributeDocuments); + } + if (!empty($indexDocuments)) { + $dbForProject->createDocuments('indexes', $indexDocuments); + } + } catch (DuplicateException) { + throw new Exception($this->getDuplicateException()); + } + + $dbForProject->purgeCachedDocument('database_' . $database->getSequence(), $collection->getId()); + $dbForProject->purgeCachedCollection('database_' . $database->getSequence() . '_collection_' . $collection->getSequence()); + $queueForEvents ->setContext('database', $database) ->setParam('databaseId', $databaseId) @@ -136,4 +175,191 @@ class Create extends Action ->setStatusCode(SwooleResponse::STATUS_CODE_CREATED) ->dynamic($collection, $this->getResponseModel()); } + + /** + * Build attribute Document objects from a definition array + * + * @return array{collection: Document, document: Document} + */ + protected function buildAttributeDocument(Document $database, Document $collection, array $attributeDef, Database $dbForProject): array + { + $key = $attributeDef['key']; + $type = $attributeDef['type']; + $size = $attributeDef['size'] ?? 0; + $required = $attributeDef['required'] ?? false; + $signed = $attributeDef['signed'] ?? true; + $array = $attributeDef['array'] ?? false; + $format = $attributeDef['format'] ?? ''; + $formatOptions = []; + $filters = $attributeDef['filters'] ?? []; + $default = $attributeDef['default'] ?? null; + $options = []; + + if ($type === Database::VAR_STRING) { + if ($size === 0) { + $size = 256; // Default size for strings + } + } + + if ($format === APP_DATABASE_ATTRIBUTE_ENUM && isset($attributeDef['elements'])) { + $formatOptions = ['elements' => $attributeDef['elements']]; + } + + if (isset($attributeDef['min']) && isset($attributeDef['max'])) { + $format = $type === Database::VAR_INTEGER ? APP_DATABASE_ATTRIBUTE_INT_RANGE : APP_DATABASE_ATTRIBUTE_FLOAT_RANGE; + $formatOptions = [ + 'min' => $attributeDef['min'], + 'max' => $attributeDef['max'], + ]; + } + + if ($type === Database::VAR_RELATIONSHIP) { + $options = [ + 'relatedCollection' => $attributeDef['relatedCollection'] ?? '', + 'relationType' => $attributeDef['relationType'] ?? Database::RELATION_ONE_TO_ONE, + 'twoWay' => $attributeDef['twoWay'] ?? false, + 'twoWayKey' => $attributeDef['twoWayKey'] ?? '', + 'onDelete' => $attributeDef['onDelete'] ?? Database::RELATION_MUTATE_RESTRICT, + ]; + } + + if (!empty($format)) { + if (!Structure::hasFormat($format, $type)) { + throw new Exception($this->getFormatUnsupportedException(), "Format $format not available for $type attributes."); + } + } + + if ($required && isset($default) && $default !== null) { + throw new Exception($this->getDefaultUnsupportedException(), 'Cannot set default value for required ' . $this->getContext()); + } + + if ($array && isset($default) && $default !== null) { + throw new Exception($this->getDefaultUnsupportedException(), 'Cannot set default value for array ' . $this->getContext() . 's'); + } + + if ($type === Database::VAR_RELATIONSHIP) { + $options['side'] = Database::RELATION_SIDE_PARENT; + $relatedCollection = $dbForProject->getDocument('database_' . $database->getSequence(), $options['relatedCollection'] ?? ''); + if ($relatedCollection->isEmpty()) { + $parent = $this->isCollectionsAPI() ? 'collection' : 'table'; + throw new Exception($this->getParentNotFoundException(), "The related $parent was not found."); + } + } + + $collectionDoc = new Document([ + '$id' => $key, + 'key' => $key, + 'type' => $type, + 'size' => $size, + 'required' => $required, + 'signed' => $signed, + 'default' => $default, + 'array' => $array, + 'format' => $format, + 'formatOptions' => $formatOptions, + 'filters' => $filters, + 'options' => $options, + ]); + + $document = new Document([ + '$id' => ID::custom($database->getSequence() . '_' . $collection->getSequence() . '_' . $key), + 'key' => $key, + 'databaseInternalId' => $database->getSequence(), + 'databaseId' => $database->getId(), + 'collectionInternalId' => $collection->getSequence(), + 'collectionId' => $collection->getId(), + 'type' => $type, + 'status' => 'available', + 'size' => $size, + 'required' => $required, + 'signed' => $signed, + 'default' => $default, + 'array' => $array, + 'format' => $format, + 'formatOptions' => $formatOptions, + 'filters' => $filters, + 'options' => $options, + ]); + + return [ + 'collection' => $collectionDoc, + 'document' => $document, + ]; + } + + /** + * Build index Document objects from a definition array + * + * @return array{collection: Document, document: Document} + */ + protected function buildIndexDocument(Document $database, Document $collection, array $indexDef, array $attributeDocuments): array + { + $key = $indexDef['key']; + $type = $indexDef['type']; + $indexAttributes = $indexDef['attributes']; + $orders = $indexDef['orders'] ?? []; + $lengths = $indexDef['lengths'] ?? []; + + $attrKeys = array_map(fn ($a) => $a->getAttribute('key'), $attributeDocuments); + + $systemAttrs = ['$id', '$createdAt', '$updatedAt']; + + foreach ($indexAttributes as $i => $attr) { + if (!in_array($attr, $attrKeys) && !in_array($attr, $systemAttrs)) { + throw new Exception($this->getParentUnknownException(), "Unknown attribute: " . $attr . ". Verify the attribute name or ensure it's in the attributes list."); + } + + $attrIndex = array_search($attr, $attrKeys); + if ($attrIndex !== false) { + $attrDoc = $attributeDocuments[$attrIndex]; + $attrType = $attrDoc->getAttribute('type'); + $attrArray = $attrDoc->getAttribute('array', false); + + if ($attrType === Database::VAR_RELATIONSHIP) { + throw new Exception($this->getParentInvalidTypeException(), "Cannot create an index for a relationship attribute: " . $attr); + } + + if (empty($lengths[$i])) { + $lengths[$i] = null; + } + + if ($attrArray === true) { + $lengths[$i] = Database::MAX_ARRAY_INDEX_LENGTH; + $orders[$i] = null; + } + } else { + if (empty($lengths[$i])) { + $lengths[$i] = null; + } + } + } + + $collectionDoc = new Document([ + '$id' => $key, + 'key' => $key, + 'type' => $type, + 'attributes' => $indexAttributes, + 'lengths' => $lengths, + 'orders' => $orders, + ]); + + $document = new Document([ + '$id' => ID::custom($database->getSequence() . '_' . $collection->getSequence() . '_' . $key), + 'key' => $key, + 'status' => 'available', + 'databaseInternalId' => $database->getSequence(), + 'databaseId' => $database->getId(), + 'collectionInternalId' => $collection->getSequence(), + 'collectionId' => $collection->getId(), + 'type' => $type, + 'attributes' => $indexAttributes, + 'lengths' => $lengths, + 'orders' => $orders, + ]); + + return [ + 'collection' => $collectionDoc, + 'document' => $document, + ]; + } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Create.php index 68d3e772ec..060f4d418e 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Create.php @@ -7,7 +7,9 @@ use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; +use Appwrite\Utopia\Database\Validator\Attributes as AttributesValidator; use Appwrite\Utopia\Database\Validator\CustomId; +use Appwrite\Utopia\Database\Validator\Indexes as IndexesValidator; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Validator\Permissions; use Utopia\Database\Validator\UID; @@ -60,6 +62,8 @@ class Create extends CollectionCreate ->param('permissions', null, new Nullable(new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE)), 'An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).', true) ->param('rowSecurity', false, new Boolean(true), 'Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a row. [Learn more about permissions](https://appwrite.io/docs/permissions).', true) ->param('enabled', true, new Boolean(), 'Is table enabled? When set to \'disabled\', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.', true) + ->param('columns', [], new AttributesValidator(), 'Array of column definitions to create. Each column should contain: key (string), type (string: string, integer, float, boolean, datetime, relationship), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.', true) + ->param('indexes', [], new IndexesValidator(), 'Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of column keys), orders (array of ASC/DESC, optional), and lengths (array of integers, optional).', true) ->inject('response') ->inject('dbForProject') ->inject('queueForEvents') diff --git a/src/Appwrite/Utopia/Database/Validator/Attributes.php b/src/Appwrite/Utopia/Database/Validator/Attributes.php new file mode 100644 index 0000000000..fafa1d0f8e --- /dev/null +++ b/src/Appwrite/Utopia/Database/Validator/Attributes.php @@ -0,0 +1,211 @@ + Supported attribute types + */ + protected array $supportedTypes = [ + Database::VAR_STRING, + Database::VAR_INTEGER, + Database::VAR_FLOAT, + Database::VAR_BOOLEAN, + Database::VAR_DATETIME, + Database::VAR_RELATIONSHIP, + Database::VAR_POINT, + Database::VAR_LINESTRING, + Database::VAR_POLYGON, + ]; + + /** + * @var array Supported formats for string attributes + */ + protected array $supportedFormats = [ + '', + APP_DATABASE_ATTRIBUTE_EMAIL, + APP_DATABASE_ATTRIBUTE_ENUM, + APP_DATABASE_ATTRIBUTE_IP, + APP_DATABASE_ATTRIBUTE_URL, + ]; + + /** + * @param int $maxAttributes Maximum number of attributes allowed + */ + public function __construct(int $maxAttributes = APP_LIMIT_ARRAY_PARAMS_SIZE) + { + $this->maxAttributes = $maxAttributes; + } + + /** + * Get Description + * + * Returns validator description + * + * @return string + */ + public function getDescription(): string + { + return $this->message; + } + + /** + * Is valid + * + * @param mixed $value + * @return bool + */ + public function isValid($value): bool + { + if (!is_array($value)) { + $this->message = 'Attributes must be an array'; + return false; + } + + if (count($value) > $this->maxAttributes) { + $this->message = 'Maximum of ' . $this->maxAttributes . ' attributes allowed'; + return false; + } + + $keyValidator = new Key(); + $keys = []; + + foreach ($value as $index => $attribute) { + if (!is_array($attribute)) { + $this->message = "Attribute at index $index must be an object"; + return false; + } + + // Validate required fields + if (!isset($attribute['key'])) { + $this->message = "Attribute at index $index is missing required field 'key'"; + return false; + } + + if (!isset($attribute['type'])) { + $this->message = "Attribute at index $index is missing required field 'type'"; + return false; + } + + // Validate key + if (!$keyValidator->isValid($attribute['key'])) { + $this->message = "Invalid key for attribute at index $index: " . $keyValidator->getDescription(); + return false; + } + + // Check for duplicate keys + if (in_array($attribute['key'], $keys)) { + $this->message = "Duplicate attribute key: " . $attribute['key']; + return false; + } + $keys[] = $attribute['key']; + + // Validate type + if (!in_array($attribute['type'], $this->supportedTypes)) { + $this->message = "Invalid type for attribute '" . $attribute['key'] . "': " . $attribute['type']; + return false; + } + + // Validate size for string types + if ($attribute['type'] === Database::VAR_STRING) { + if (!isset($attribute['size']) || !is_int($attribute['size']) || $attribute['size'] < 1 || $attribute['size'] > APP_DATABASE_ATTRIBUTE_STRING_MAX_LENGTH) { + $this->message = "Invalid or missing size for string attribute '" . $attribute['key'] . "'. Size must be between 1 and " . APP_DATABASE_ATTRIBUTE_STRING_MAX_LENGTH; + return false; + } + } + + // Validate format if provided + if (isset($attribute['format']) && $attribute['format'] !== '') { + if (!in_array($attribute['format'], $this->supportedFormats)) { + $this->message = "Invalid format for attribute '" . $attribute['key'] . "': " . $attribute['format']; + return false; + } + } + + // Validate required field if provided + if (isset($attribute['required']) && !is_bool($attribute['required'])) { + $this->message = "Invalid 'required' value for attribute '" . $attribute['key'] . "': must be a boolean"; + return false; + } + + // Validate array field if provided + if (isset($attribute['array']) && !is_bool($attribute['array'])) { + $this->message = "Invalid 'array' value for attribute '" . $attribute['key'] . "': must be a boolean"; + return false; + } + + // Validate signed field if provided + if (isset($attribute['signed']) && !is_bool($attribute['signed'])) { + $this->message = "Invalid 'signed' value for attribute '" . $attribute['key'] . "': must be a boolean"; + return false; + } + + // Validate required and default conflict + if (isset($attribute['required']) && $attribute['required'] === true && isset($attribute['default']) && $attribute['default'] !== null) { + $this->message = "Attribute '" . $attribute['key'] . "' cannot have a default value when required is true"; + return false; + } + + // Validate array and default conflict + if (isset($attribute['array']) && $attribute['array'] === true && isset($attribute['default']) && $attribute['default'] !== null) { + $this->message = "Attribute '" . $attribute['key'] . "' cannot have a default value when array is true"; + return false; + } + + // Validate enum elements if format is enum + if (isset($attribute['format']) && $attribute['format'] === APP_DATABASE_ATTRIBUTE_ENUM) { + if (!isset($attribute['elements']) || !is_array($attribute['elements']) || empty($attribute['elements'])) { + $this->message = "Attribute '" . $attribute['key'] . "' with enum format must have 'elements' array"; + return false; + } + } + + // Validate relationship options + if ($attribute['type'] === Database::VAR_RELATIONSHIP) { + if (!isset($attribute['relatedCollection']) || empty($attribute['relatedCollection'])) { + $this->message = "Relationship attribute '" . $attribute['key'] . "' must have 'relatedCollection'"; + return false; + } + if (!isset($attribute['relationType']) || !in_array($attribute['relationType'], [ + Database::RELATION_ONE_TO_ONE, + Database::RELATION_ONE_TO_MANY, + Database::RELATION_MANY_TO_ONE, + Database::RELATION_MANY_TO_MANY, + ])) { + $this->message = "Relationship attribute '" . $attribute['key'] . "' must have valid 'relationType'"; + return false; + } + } + } + + return true; + } + + /** + * Is array + * + * @return bool + */ + public function isArray(): bool + { + return false; + } + + /** + * Get Type + * + * @return string + */ + public function getType(): string + { + return self::TYPE_ARRAY; + } +} diff --git a/src/Appwrite/Utopia/Database/Validator/Indexes.php b/src/Appwrite/Utopia/Database/Validator/Indexes.php new file mode 100644 index 0000000000..d60d53c764 --- /dev/null +++ b/src/Appwrite/Utopia/Database/Validator/Indexes.php @@ -0,0 +1,190 @@ + Supported index types + */ + protected array $supportedTypes = [ + Database::INDEX_KEY, + Database::INDEX_FULLTEXT, + Database::INDEX_UNIQUE, + Database::INDEX_SPATIAL, + ]; + + /** + * @var array Supported orders + */ + protected array $supportedOrders = [ + Database::ORDER_ASC, + Database::ORDER_DESC, + ]; + + /** + * @param int $maxIndexes Maximum number of indexes allowed + */ + public function __construct(int $maxIndexes = APP_LIMIT_ARRAY_PARAMS_SIZE) + { + $this->maxIndexes = $maxIndexes; + } + + /** + * Get Description + * + * Returns validator description + * + * @return string + */ + public function getDescription(): string + { + return $this->message; + } + + /** + * Is valid + * + * @param mixed $value + * @return bool + */ + public function isValid($value): bool + { + if (!is_array($value)) { + $this->message = 'Indexes must be an array'; + return false; + } + + if (count($value) > $this->maxIndexes) { + $this->message = 'Maximum of ' . $this->maxIndexes . ' indexes allowed'; + return false; + } + + $keyValidator = new Key(); + $keys = []; + + foreach ($value as $index => $indexDef) { + if (!is_array($indexDef)) { + $this->message = "Index at position $index must be an object"; + return false; + } + + // Validate required fields + if (!isset($indexDef['key'])) { + $this->message = "Index at position $index is missing required field 'key'"; + return false; + } + + if (!isset($indexDef['type'])) { + $this->message = "Index at position $index is missing required field 'type'"; + return false; + } + + if (!isset($indexDef['attributes']) || !is_array($indexDef['attributes'])) { + $this->message = "Index at position $index is missing required field 'attributes' (must be an array)"; + return false; + } + + // Validate key + if (!$keyValidator->isValid($indexDef['key'])) { + $this->message = "Invalid key for index at position $index: " . $keyValidator->getDescription(); + return false; + } + + // Check for duplicate keys + if (in_array($indexDef['key'], $keys)) { + $this->message = "Duplicate index key: " . $indexDef['key']; + return false; + } + $keys[] = $indexDef['key']; + + // Validate type + if (!in_array($indexDef['type'], $this->supportedTypes)) { + $this->message = "Invalid type for index '" . $indexDef['key'] . "': " . $indexDef['type']; + return false; + } + + // Validate attributes array + if (empty($indexDef['attributes'])) { + $this->message = "Index '" . $indexDef['key'] . "' must have at least one attribute"; + return false; + } + + if (count($indexDef['attributes']) > APP_LIMIT_ARRAY_PARAMS_SIZE) { + $this->message = "Index '" . $indexDef['key'] . "' cannot have more than " . APP_LIMIT_ARRAY_PARAMS_SIZE . " attributes"; + return false; + } + + // Validate each attribute in the index + foreach ($indexDef['attributes'] as $attrIndex => $attr) { + if (!is_string($attr)) { + $this->message = "Invalid attribute at position $attrIndex in index '" . $indexDef['key'] . "': must be a string"; + return false; + } + if (!$keyValidator->isValid($attr) && !in_array($attr, ['$id', '$createdAt', '$updatedAt'])) { + $this->message = "Invalid attribute name '$attr' in index '" . $indexDef['key'] . "'"; + return false; + } + } + + // Validate orders if provided + if (isset($indexDef['orders'])) { + if (!is_array($indexDef['orders'])) { + $this->message = "Index '" . $indexDef['key'] . "' orders must be an array"; + return false; + } + + foreach ($indexDef['orders'] as $order) { + if ($order !== null && $order !== '' && !in_array($order, $this->supportedOrders)) { + $this->message = "Invalid order '$order' in index '" . $indexDef['key'] . "'. Must be 'ASC' or 'DESC'"; + return false; + } + } + } + + // Validate lengths if provided + if (isset($indexDef['lengths'])) { + if (!is_array($indexDef['lengths'])) { + $this->message = "Index '" . $indexDef['key'] . "' lengths must be an array"; + return false; + } + + foreach ($indexDef['lengths'] as $length) { + if ($length !== null && (!is_int($length) || $length < 0)) { + $this->message = "Invalid length in index '" . $indexDef['key'] . "': must be a non-negative integer or null"; + return false; + } + } + } + } + + return true; + } + + /** + * Is array + * + * @return bool + */ + public function isArray(): bool + { + return false; + } + + /** + * Get Type + * + * @return string + */ + public function getType(): string + { + return self::TYPE_ARRAY; + } +} From cc50ba6b7d43914e2f142277379b715012702412 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Mon, 1 Dec 2025 21:43:50 +1300 Subject: [PATCH 02/20] Add custom server test --- .../Legacy/DatabasesCustomServerTest.php | 420 ++++++++++++++++++ 1 file changed, 420 insertions(+) diff --git a/tests/e2e/Services/Databases/Legacy/DatabasesCustomServerTest.php b/tests/e2e/Services/Databases/Legacy/DatabasesCustomServerTest.php index 22ce1eb1e3..7796f2c2f0 100644 --- a/tests/e2e/Services/Databases/Legacy/DatabasesCustomServerTest.php +++ b/tests/e2e/Services/Databases/Legacy/DatabasesCustomServerTest.php @@ -6780,4 +6780,424 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-key' => $this->getProject()['apiKey'] ])); } + + public function testCreateCollectionWithAttributesAndIndexes(): void + { + // Create database + $database = $this->client->call(Client::METHOD_POST, '/databases', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'databaseId' => ID::unique(), + 'name' => 'Test Multi Create', + ]); + + $this->assertEquals(201, $database['headers']['status-code']); + $databaseId = $database['body']['$id']; + + // Test: Create collection with attributes and indexes in one call + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::custom('movies'), + 'name' => 'Movies', + 'permissions' => [ + Permission::read(Role::any()), + Permission::create(Role::any()), + Permission::update(Role::any()), + Permission::delete(Role::any()), + ], + 'documentSecurity' => true, + 'attributes' => [ + [ + 'key' => 'title', + 'type' => Database::VAR_STRING, + 'size' => 256, + 'required' => true, + ], + [ + 'key' => 'year', + 'type' => Database::VAR_INTEGER, + 'required' => false, + 'default' => 2024, + ], + [ + 'key' => 'rating', + 'type' => Database::VAR_FLOAT, + 'required' => false, + ], + [ + 'key' => 'active', + 'type' => Database::VAR_BOOLEAN, + 'required' => false, + 'default' => true, + ], + ], + 'indexes' => [ + [ + 'key' => 'idx_title', + 'type' => Database::INDEX_KEY, + 'attributes' => ['title'], + ], + [ + 'key' => 'idx_year', + 'type' => Database::INDEX_KEY, + 'attributes' => ['year'], + 'orders' => ['DESC'], + ], + ], + ]); + + $this->assertEquals(201, $collection['headers']['status-code']); + $this->assertEquals('Movies', $collection['body']['name']); + $this->assertEquals('movies', $collection['body']['$id']); + + // Verify attributes were created and are available + $attributes = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/movies/attributes', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $this->assertEquals(200, $attributes['headers']['status-code']); + $this->assertEquals(4, $attributes['body']['total']); + + $attrByKey = []; + foreach ($attributes['body']['attributes'] as $attr) { + $attrByKey[$attr['key']] = $attr; + } + + $this->assertEquals('available', $attrByKey['title']['status']); + $this->assertEquals(Database::VAR_STRING, $attrByKey['title']['type']); + $this->assertEquals(256, $attrByKey['title']['size']); + $this->assertTrue($attrByKey['title']['required']); + + $this->assertEquals('available', $attrByKey['year']['status']); + $this->assertEquals(Database::VAR_INTEGER, $attrByKey['year']['type']); + $this->assertFalse($attrByKey['year']['required']); + $this->assertEquals(2024, $attrByKey['year']['default']); + + $this->assertEquals('available', $attrByKey['rating']['status']); + $this->assertEquals(Database::VAR_FLOAT, $attrByKey['rating']['type']); + + $this->assertEquals('available', $attrByKey['active']['status']); + $this->assertEquals(Database::VAR_BOOLEAN, $attrByKey['active']['type']); + $this->assertTrue($attrByKey['active']['default']); + + // Verify indexes were created and are available + $indexes = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/movies/indexes', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $this->assertEquals(200, $indexes['headers']['status-code']); + $this->assertEquals(2, $indexes['body']['total']); + + $idxByKey = []; + foreach ($indexes['body']['indexes'] as $idx) { + $idxByKey[$idx['key']] = $idx; + } + + $this->assertEquals('available', $idxByKey['idx_title']['status']); + $this->assertEquals(Database::INDEX_KEY, $idxByKey['idx_title']['type']); + $this->assertEquals(['title'], $idxByKey['idx_title']['attributes']); + + $this->assertEquals('available', $idxByKey['idx_year']['status']); + $this->assertEquals(Database::INDEX_KEY, $idxByKey['idx_year']['type']); + $this->assertEquals(['year'], $idxByKey['idx_year']['attributes']); + $this->assertEquals(['DESC'], $idxByKey['idx_year']['orders']); + + // Verify we can create documents using the attributes + $document = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/movies/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'documentId' => ID::unique(), + 'data' => [ + 'title' => 'The Matrix', + 'year' => 1999, + 'rating' => 8.7, + 'active' => true, + ], + ]); + + $this->assertEquals(201, $document['headers']['status-code']); + $this->assertEquals('The Matrix', $document['body']['title']); + $this->assertEquals(1999, $document['body']['year']); + $this->assertEquals(8.7, $document['body']['rating']); + $this->assertTrue($document['body']['active']); + + // Test: Create document with default values + $document2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/movies/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'documentId' => ID::unique(), + 'data' => [ + 'title' => 'New Movie', + ], + ]); + + $this->assertEquals(201, $document2['headers']['status-code']); + $this->assertEquals('New Movie', $document2['body']['title']); + $this->assertEquals(2024, $document2['body']['year']); // default value + $this->assertTrue($document2['body']['active']); // default value + + // Cleanup + $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + } + + public function testCreateCollectionWithAttributesAndIndexesErrors(): void + { + // Create database + $database = $this->client->call(Client::METHOD_POST, '/databases', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'databaseId' => ID::unique(), + 'name' => 'Test Multi Create Errors', + ]); + + $this->assertEquals(201, $database['headers']['status-code']); + $databaseId = $database['body']['$id']; + + // Test: Invalid attribute type + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Invalid Type', + 'attributes' => [ + [ + 'key' => 'test', + 'type' => 'invalid_type', + 'size' => 256, + ], + ], + ]); + + $this->assertEquals(400, $collection['headers']['status-code']); + + // Test: Index referencing non-existent attribute + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Invalid Index', + 'attributes' => [ + [ + 'key' => 'title', + 'type' => Database::VAR_STRING, + 'size' => 256, + ], + ], + 'indexes' => [ + [ + 'key' => 'idx_invalid', + 'type' => Database::INDEX_KEY, + 'attributes' => ['nonexistent'], + ], + ], + ]); + + $this->assertEquals(400, $collection['headers']['status-code']); + + // Test: String attribute without size + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'No Size', + 'attributes' => [ + [ + 'key' => 'title', + 'type' => Database::VAR_STRING, + ], + ], + ]); + + // Should succeed with default size + $this->assertEquals(201, $collection['headers']['status-code']); + + // Test: Required attribute with default value (should fail) + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Required With Default', + 'attributes' => [ + [ + 'key' => 'title', + 'type' => Database::VAR_STRING, + 'size' => 256, + 'required' => true, + 'default' => 'test', + ], + ], + ]); + + $this->assertEquals(400, $collection['headers']['status-code']); + + // Test: Duplicate attribute keys + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Duplicate Keys', + 'attributes' => [ + [ + 'key' => 'title', + 'type' => Database::VAR_STRING, + 'size' => 256, + ], + [ + 'key' => 'title', + 'type' => Database::VAR_STRING, + 'size' => 128, + ], + ], + ]); + + $this->assertEquals(400, $collection['headers']['status-code']); + + // Test: Index on system attribute ($id) + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'System Attr Index', + 'attributes' => [], + 'indexes' => [ + [ + 'key' => 'idx_id', + 'type' => Database::INDEX_KEY, + 'attributes' => ['$id'], + ], + ], + ]); + + // Should succeed - system attributes can be indexed + $this->assertEquals(201, $collection['headers']['status-code']); + + // Cleanup + $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + } + + public function testCreateCollectionWithEnumAttribute(): void + { + // Create database + $database = $this->client->call(Client::METHOD_POST, '/databases', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'databaseId' => ID::unique(), + 'name' => 'Test Enum', + ]); + + $this->assertEquals(201, $database['headers']['status-code']); + $databaseId = $database['body']['$id']; + + // Test: Create collection with enum attribute + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::custom('status_collection'), + 'name' => 'Status Collection', + 'permissions' => [ + Permission::read(Role::any()), + Permission::create(Role::any()), + ], + 'attributes' => [ + [ + 'key' => 'status', + 'type' => Database::VAR_STRING, + 'size' => 32, + 'required' => true, + 'format' => 'enum', + 'elements' => ['pending', 'active', 'completed', 'cancelled'], + ], + ], + ]); + + $this->assertEquals(201, $collection['headers']['status-code']); + + // Verify attribute + $attributes = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/status_collection/attributes', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $this->assertEquals(200, $attributes['headers']['status-code']); + $this->assertEquals(1, $attributes['body']['total']); + $this->assertEquals('available', $attributes['body']['attributes'][0]['status']); + $this->assertEquals('enum', $attributes['body']['attributes'][0]['format']); + $this->assertEquals(['pending', 'active', 'completed', 'cancelled'], $attributes['body']['attributes'][0]['elements']); + + // Test creating document with valid enum value + $document = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/status_collection/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'documentId' => ID::unique(), + 'data' => [ + 'status' => 'active', + ], + ]); + + $this->assertEquals(201, $document['headers']['status-code']); + $this->assertEquals('active', $document['body']['status']); + + // Test creating document with invalid enum value + $document = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/status_collection/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'documentId' => ID::unique(), + 'data' => [ + 'status' => 'invalid_status', + ], + ]); + + $this->assertEquals(400, $document['headers']['status-code']); + + // Cleanup + $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + } } From 8b4657ff8a1d7a69ef0414a427b3b2ee68c9c078 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Wed, 3 Dec 2025 21:17:38 +1300 Subject: [PATCH 03/20] Cleanup on create failures --- .../Http/Databases/Collections/Create.php | 59 +++++++++++++--- .../Legacy/DatabasesCustomServerTest.php | 70 +++++++++++++++++++ 2 files changed, 120 insertions(+), 9 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Create.php index caa80c74d2..1682fedcfa 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Create.php @@ -119,36 +119,55 @@ class Create extends Action throw new Exception(Exception::DATABASE_NOT_FOUND); } + $collectionKey = 'database_' . $database->getSequence() . '_collection_' . $collection->getSequence(); + $databaseKey = 'database_' . $database->getSequence(); + $collectionAttributes = []; $attributeDocuments = []; - foreach ($attributes as $attributeDef) { - $attrDoc = $this->buildAttributeDocument($database, $collection, $attributeDef, $dbForProject); - $collectionAttributes[] = $attrDoc['collection']; - $attributeDocuments[] = $attrDoc['document']; + try { + foreach ($attributes as $attributeDef) { + $attrDoc = $this->buildAttributeDocument($database, $collection, $attributeDef, $dbForProject); + $collectionAttributes[] = $attrDoc['collection']; + $attributeDocuments[] = $attrDoc['document']; + } + } catch (\Throwable $e) { + $dbForProject->deleteDocument($databaseKey, $collection->getId()); + throw $e; } $collectionIndexes = []; $indexDocuments = []; - foreach ($indexes as $indexDef) { - $idxDoc = $this->buildIndexDocument($database, $collection, $indexDef, $collectionAttributes); - $collectionIndexes[] = $idxDoc['collection']; - $indexDocuments[] = $idxDoc['document']; + try { + foreach ($indexes as $indexDef) { + $idxDoc = $this->buildIndexDocument($database, $collection, $indexDef, $collectionAttributes); + $collectionIndexes[] = $idxDoc['collection']; + $indexDocuments[] = $idxDoc['document']; + } + } catch (\Throwable $e) { + $dbForProject->deleteDocument($databaseKey, $collection->getId()); + throw $e; } try { $dbForProject->createCollection( - id: 'database_' . $database->getSequence() . '_collection_' . $collection->getSequence(), + id: $collectionKey, attributes: $collectionAttributes, indexes: $collectionIndexes, permissions: $permissions, documentSecurity: $documentSecurity ); } catch (DuplicateException) { + $dbForProject->deleteDocument($databaseKey, $collection->getId()); throw new Exception($this->getDuplicateException()); } catch (IndexException $e) { + $dbForProject->deleteDocument($databaseKey, $collection->getId()); throw new Exception($this->getInvalidIndexException(), $e->getMessage()); } catch (LimitException) { + $dbForProject->deleteDocument($databaseKey, $collection->getId()); throw new Exception($this->getLimitException()); + } catch (\Throwable $e) { + $dbForProject->deleteDocument($databaseKey, $collection->getId()); + throw $e; } // Create documents in attributes and indexes collections @@ -160,7 +179,11 @@ class Create extends Action $dbForProject->createDocuments('indexes', $indexDocuments); } } catch (DuplicateException) { + $this->cleanup($dbForProject, $databaseKey, $collectionKey, $collection->getId()); throw new Exception($this->getDuplicateException()); + } catch (\Throwable $e) { + $this->cleanup($dbForProject, $databaseKey, $collectionKey, $collection->getId()); + throw $e; } $dbForProject->purgeCachedDocument('database_' . $database->getSequence(), $collection->getId()); @@ -362,4 +385,22 @@ class Create extends Action 'document' => $document, ]; } + + /** + * Cleanup on failure: delete the collection document and the underlying DB collection + */ + protected function cleanup(Database $dbForProject, string $databaseKey, string $collectionKey, string $collectionId): void + { + try { + $dbForProject->deleteCollection($collectionKey); + } catch (\Throwable) { + // Ignore cleanup errors for collection deletion + } + + try { + $dbForProject->deleteDocument($databaseKey, $collectionId); + } catch (\Throwable) { + // Ignore cleanup errors for document deletion + } + } } diff --git a/tests/e2e/Services/Databases/Legacy/DatabasesCustomServerTest.php b/tests/e2e/Services/Databases/Legacy/DatabasesCustomServerTest.php index 7796f2c2f0..55dffb2c34 100644 --- a/tests/e2e/Services/Databases/Legacy/DatabasesCustomServerTest.php +++ b/tests/e2e/Services/Databases/Legacy/DatabasesCustomServerTest.php @@ -7110,6 +7110,76 @@ class DatabasesCustomServerTest extends Scope ])); } + public function testCreateCollectionCleanupOnFailure(): void + { + // Create database + $database = $this->client->call(Client::METHOD_POST, '/databases', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'databaseId' => ID::unique(), + 'name' => 'Test Cleanup', + ]); + + $this->assertEquals(201, $database['headers']['status-code']); + $databaseId = $database['body']['$id']; + + $collectionId = ID::unique(); + + // Test: Create collection with invalid index referencing non-existent attribute (should fail) + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => $collectionId, + 'name' => 'Should Fail', + 'attributes' => [ + [ + 'key' => 'title', + 'type' => Database::VAR_STRING, + 'size' => 256, + ], + ], + 'indexes' => [ + [ + 'key' => 'idx_invalid', + 'type' => Database::INDEX_KEY, + 'attributes' => ['nonexistent'], + ], + ], + ]); + + $this->assertEquals(400, $collection['headers']['status-code']); + + // Verify collection was cleaned up - creating with same ID should succeed + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => $collectionId, + 'name' => 'Should Succeed', + 'attributes' => [ + [ + 'key' => 'title', + 'type' => Database::VAR_STRING, + 'size' => 256, + ], + ], + ]); + + $this->assertEquals(201, $collection['headers']['status-code']); + + // Cleanup + $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + } + public function testCreateCollectionWithEnumAttribute(): void { // Create database From 7d261310193d9bb8c5cc4f85c475518eab6e33ec Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Wed, 3 Dec 2025 21:19:53 +1300 Subject: [PATCH 04/20] Validate other relationship options --- .../Utopia/Database/Validator/Attributes.php | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/Appwrite/Utopia/Database/Validator/Attributes.php b/src/Appwrite/Utopia/Database/Validator/Attributes.php index fafa1d0f8e..48339bc642 100644 --- a/src/Appwrite/Utopia/Database/Validator/Attributes.php +++ b/src/Appwrite/Utopia/Database/Validator/Attributes.php @@ -183,6 +183,30 @@ class Attributes extends Validator $this->message = "Relationship attribute '" . $attribute['key'] . "' must have valid 'relationType'"; return false; } + + // Validate twoWay if provided + if (isset($attribute['twoWay']) && !is_bool($attribute['twoWay'])) { + $this->message = "Invalid 'twoWay' value for relationship attribute '" . $attribute['key'] . "': must be a boolean"; + return false; + } + + // Validate twoWayKey if provided + if (isset($attribute['twoWayKey']) && !empty($attribute['twoWayKey'])) { + if (!$keyValidator->isValid($attribute['twoWayKey'])) { + $this->message = "Invalid 'twoWayKey' for relationship attribute '" . $attribute['key'] . "': " . $keyValidator->getDescription(); + return false; + } + } + + // Validate onDelete if provided + if (isset($attribute['onDelete']) && !in_array($attribute['onDelete'], [ + Database::RELATION_MUTATE_CASCADE, + Database::RELATION_MUTATE_RESTRICT, + Database::RELATION_MUTATE_SET_NULL, + ])) { + $this->message = "Invalid 'onDelete' value for relationship attribute '" . $attribute['key'] . "': must be 'cascade', 'restrict', or 'setNull'"; + return false; + } } } From 4de4b475a1b08d89fb6199bf0893f5b6835ce234 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Wed, 3 Dec 2025 22:07:34 +1300 Subject: [PATCH 05/20] Add more validation cases --- .../Http/Databases/Collections/Create.php | 35 ++++- .../Utopia/Database/Validator/Attributes.php | 144 +++++++++++++++++- .../Utopia/Database/Validator/Indexes.php | 78 ++++++---- 3 files changed, 217 insertions(+), 40 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Create.php index 1682fedcfa..a4e2265bfb 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Create.php @@ -23,6 +23,7 @@ use Utopia\Database\Exception\Structure as StructureException; use Utopia\Database\Helpers\ID; use Utopia\Database\Helpers\Permission; use Utopia\Database\Validator\Authorization; +use Utopia\Database\Validator\Index as IndexValidator; use Utopia\Database\Validator\Permissions; use Utopia\Database\Validator\Structure; use Utopia\Database\Validator\UID; @@ -135,11 +136,17 @@ class Create extends Action throw $e; } + $indexLimit = $dbForProject->getLimitForIndexes(); + if (\count($indexes) > $indexLimit) { + $dbForProject->deleteDocument($databaseKey, $collection->getId()); + throw new Exception($this->getLimitException(), "Cannot create more than $indexLimit indexes for a collection"); + } + $collectionIndexes = []; $indexDocuments = []; try { foreach ($indexes as $indexDef) { - $idxDoc = $this->buildIndexDocument($database, $collection, $indexDef, $collectionAttributes); + $idxDoc = $this->buildIndexDocument($database, $collection, $indexDef, $collectionAttributes, $dbForProject); $collectionIndexes[] = $idxDoc['collection']; $indexDocuments[] = $idxDoc['document']; } @@ -260,6 +267,12 @@ class Create extends Action throw new Exception($this->getDefaultUnsupportedException(), 'Cannot set default value for array ' . $this->getContext() . 's'); } + if (\in_array($type, Database::SPATIAL_TYPES)) { + if (!$dbForProject->getAdapter()->getSupportForSpatialIndex()) { + throw new Exception($this->getFormatUnsupportedException(), "Spatial attributes are not supported by the current database"); + } + } + if ($type === Database::VAR_RELATIONSHIP) { $options['side'] = Database::RELATION_SIDE_PARENT; $relatedCollection = $dbForProject->getDocument('database_' . $database->getSequence(), $options['relatedCollection'] ?? ''); @@ -315,7 +328,7 @@ class Create extends Action * * @return array{collection: Document, document: Document} */ - protected function buildIndexDocument(Document $database, Document $collection, array $indexDef, array $attributeDocuments): array + protected function buildIndexDocument(Document $database, Document $collection, array $indexDef, array $attributeDocuments, Database $dbForProject): array { $key = $indexDef['key']; $type = $indexDef['type']; @@ -380,6 +393,24 @@ class Create extends Action 'orders' => $orders, ]); + $indexValidator = new IndexValidator( + $attributeDocuments, + [], + $dbForProject->getAdapter()->getMaxIndexLength(), + $dbForProject->getAdapter()->getInternalIndexesKeys(), + $dbForProject->getAdapter()->getSupportForIndexArray(), + $dbForProject->getAdapter()->getSupportForSpatialIndexNull(), + $dbForProject->getAdapter()->getSupportForSpatialIndexOrder(), + $dbForProject->getAdapter()->getSupportForVectors(), + $dbForProject->getAdapter()->getSupportForAttributes(), + $dbForProject->getAdapter()->getSupportForMultipleFulltextIndexes(), + $dbForProject->getAdapter()->getSupportForIdenticalIndexes() + ); + + if (!$indexValidator->isValid($collectionDoc)) { + throw new Exception($this->getInvalidIndexException(), $indexValidator->getDescription()); + } + return [ 'collection' => $collectionDoc, 'document' => $document, diff --git a/src/Appwrite/Utopia/Database/Validator/Attributes.php b/src/Appwrite/Utopia/Database/Validator/Attributes.php index 48339bc642..fae6d6a3b0 100644 --- a/src/Appwrite/Utopia/Database/Validator/Attributes.php +++ b/src/Appwrite/Utopia/Database/Validator/Attributes.php @@ -3,8 +3,12 @@ namespace Appwrite\Utopia\Database\Validator; use Utopia\Database\Database; +use Utopia\Database\Validator\Datetime as DatetimeValidator; use Utopia\Database\Validator\Key; use Utopia\Validator; +use Utopia\Validator\Boolean as BooleanValidator; +use Utopia\Validator\Range; +use Utopia\Validator\Text; class Attributes extends Validator { @@ -65,12 +69,12 @@ class Attributes extends Validator */ public function isValid($value): bool { - if (!is_array($value)) { + if (!\is_array($value)) { $this->message = 'Attributes must be an array'; return false; } - if (count($value) > $this->maxAttributes) { + if (\count($value) > $this->maxAttributes) { $this->message = 'Maximum of ' . $this->maxAttributes . ' attributes allowed'; return false; } @@ -79,7 +83,7 @@ class Attributes extends Validator $keys = []; foreach ($value as $index => $attribute) { - if (!is_array($attribute)) { + if (!\is_array($attribute)) { $this->message = "Attribute at index $index must be an object"; return false; } @@ -108,6 +112,13 @@ class Attributes extends Validator } $keys[] = $attribute['key']; + // Check for reserved keys + $reservedKeys = ['$id', '$createdAt', '$updatedAt', '$permissions', '$collection']; + if (in_array($attribute['key'], $reservedKeys)) { + $this->message = "Attribute key '" . $attribute['key'] . "' is reserved and cannot be used"; + return false; + } + // Validate type if (!in_array($attribute['type'], $this->supportedTypes)) { $this->message = "Invalid type for attribute '" . $attribute['key'] . "': " . $attribute['type']; @@ -148,6 +159,12 @@ class Attributes extends Validator return false; } + // Validate signed only for integer/float types + if (isset($attribute['signed']) && !in_array($attribute['type'], [Database::VAR_INTEGER, Database::VAR_FLOAT])) { + $this->message = "Attribute '" . $attribute['key'] . "': 'signed' can only be used with integer or float types"; + return false; + } + // Validate required and default conflict if (isset($attribute['required']) && $attribute['required'] === true && isset($attribute['default']) && $attribute['default'] !== null) { $this->message = "Attribute '" . $attribute['key'] . "' cannot have a default value when required is true"; @@ -160,20 +177,137 @@ class Attributes extends Validator return false; } + // Validate min/max range for integer/float + if (isset($attribute['min']) && isset($attribute['max'])) { + if (!in_array($attribute['type'], [Database::VAR_INTEGER, Database::VAR_FLOAT])) { + $this->message = "Attribute '" . $attribute['key'] . "': min/max can only be used with integer or float types"; + return false; + } + + if ($attribute['min'] > $attribute['max']) { + $this->message = "Attribute '" . $attribute['key'] . "': minimum value must be less than or equal to maximum value"; + return false; + } + } + + // Validate default value matches attribute type + if (isset($attribute['default'])) { + switch ($attribute['type']) { + case Database::VAR_STRING: + if (!is_string($attribute['default'])) { + $this->message = "Default value for string attribute '" . $attribute['key'] . "' must be a string"; + return false; + } + + // Validate string size + $size = $attribute['size'] ?? 0; + if ($size > 0) { + $textValidator = new Text($size, 0); + if (!$textValidator->isValid($attribute['default'])) { + $this->message = "Default value for attribute '" . $attribute['key'] . "' exceeds maximum size of $size characters"; + return false; + } + } + break; + + case Database::VAR_INTEGER: + if (!is_int($attribute['default'])) { + $this->message = "Default value for integer attribute '" . $attribute['key'] . "' must be an integer"; + return false; + } + // Validate within range if min/max specified + if (isset($attribute['min']) || isset($attribute['max'])) { + $min = $attribute['min'] ?? \PHP_INT_MIN; + $max = $attribute['max'] ?? \PHP_INT_MAX; + $rangeValidator = new Range($min, $max, Database::VAR_INTEGER); + if (!$rangeValidator->isValid($attribute['default'])) { + $this->message = "Default value for integer attribute '" . $attribute['key'] . "' must be between $min and $max"; + return false; + } + } + break; + + case Database::VAR_FLOAT: + if (!is_float($attribute['default']) && !is_int($attribute['default'])) { + $this->message = "Default value for float attribute '" . $attribute['key'] . "' must be a number"; + return false; + } + // Validate within range if min/max specified + if (isset($attribute['min']) || isset($attribute['max'])) { + $min = $attribute['min'] ?? -\PHP_FLOAT_MAX; + $max = $attribute['max'] ?? \PHP_FLOAT_MAX; + $rangeValidator = new Range($min, $max, Database::VAR_FLOAT); + if (!$rangeValidator->isValid((float)$attribute['default'])) { + $this->message = "Default value for float attribute '" . $attribute['key'] . "' must be between $min and $max"; + return false; + } + } + break; + + case Database::VAR_BOOLEAN: + if (!is_bool($attribute['default'])) { + $this->message = "Default value for boolean attribute '" . $attribute['key'] . "' must be a boolean"; + return false; + } + break; + + case Database::VAR_DATETIME: + if (!is_string($attribute['default'])) { + $this->message = "Default value for datetime attribute '" . $attribute['key'] . "' must be a string in ISO 8601 format"; + return false; + } + // Basic datetime format validation + $datetimeValidator = new DatetimeValidator(); + if (!$datetimeValidator->isValid($attribute['default'])) { + $this->message = "Default value for datetime attribute '" . $attribute['key'] . "' must be in valid ISO 8601 format"; + return false; + } + break; + } + } + // Validate enum elements if format is enum if (isset($attribute['format']) && $attribute['format'] === APP_DATABASE_ATTRIBUTE_ENUM) { if (!isset($attribute['elements']) || !is_array($attribute['elements']) || empty($attribute['elements'])) { $this->message = "Attribute '" . $attribute['key'] . "' with enum format must have 'elements' array"; return false; } + + // Validate each enum element + foreach ($attribute['elements'] as $elementIndex => $element) { + if (!is_string($element) || empty($element)) { + $this->message = "Enum element at index $elementIndex for attribute '" . $attribute['key'] . "' must be a non-empty string"; + return false; + } + if (strlen($element) > Database::LENGTH_KEY) { + $this->message = "Enum element at index $elementIndex for attribute '" . $attribute['key'] . "' exceeds maximum length of " . Database::LENGTH_KEY . " characters"; + return false; + } + } + + // Validate default exists in elements + if (isset($attribute['default']) && $attribute['default'] !== null) { + if (!in_array($attribute['default'], $attribute['elements'], true)) { + $this->message = "Default value for enum attribute '" . $attribute['key'] . "' must be one of the provided elements"; + return false; + } + } } // Validate relationship options if ($attribute['type'] === Database::VAR_RELATIONSHIP) { - if (!isset($attribute['relatedCollection']) || empty($attribute['relatedCollection'])) { + // Validate array cannot be true for relationship + if (isset($attribute['array']) && $attribute['array'] === true) { + $this->message = "Relationship attribute '" . $attribute['key'] . "' cannot be an array type"; + return false; + } + + // Validate required fields for relationship + if (empty($attribute['relatedCollection'])) { $this->message = "Relationship attribute '" . $attribute['key'] . "' must have 'relatedCollection'"; return false; } + if (!isset($attribute['relationType']) || !in_array($attribute['relationType'], [ Database::RELATION_ONE_TO_ONE, Database::RELATION_ONE_TO_MANY, @@ -191,7 +325,7 @@ class Attributes extends Validator } // Validate twoWayKey if provided - if (isset($attribute['twoWayKey']) && !empty($attribute['twoWayKey'])) { + if (!empty($attribute['twoWayKey'])) { if (!$keyValidator->isValid($attribute['twoWayKey'])) { $this->message = "Invalid 'twoWayKey' for relationship attribute '" . $attribute['key'] . "': " . $keyValidator->getDescription(); return false; diff --git a/src/Appwrite/Utopia/Database/Validator/Indexes.php b/src/Appwrite/Utopia/Database/Validator/Indexes.php index d60d53c764..31c8c83835 100644 --- a/src/Appwrite/Utopia/Database/Validator/Indexes.php +++ b/src/Appwrite/Utopia/Database/Validator/Indexes.php @@ -70,95 +70,107 @@ class Indexes extends Validator $keyValidator = new Key(); $keys = []; - foreach ($value as $index => $indexDef) { - if (!is_array($indexDef)) { - $this->message = "Index at position $index must be an object"; + foreach ($value as $i => $index) { + if (!is_array($index)) { + $this->message = "Index at position $i must be an object"; return false; } // Validate required fields - if (!isset($indexDef['key'])) { - $this->message = "Index at position $index is missing required field 'key'"; + if (!isset($index['key'])) { + $this->message = "Index at position $i is missing required field 'key'"; return false; } - if (!isset($indexDef['type'])) { - $this->message = "Index at position $index is missing required field 'type'"; + if (!isset($index['type'])) { + $this->message = "Index at position $i is missing required field 'type'"; return false; } - if (!isset($indexDef['attributes']) || !is_array($indexDef['attributes'])) { - $this->message = "Index at position $index is missing required field 'attributes' (must be an array)"; + if (!isset($index['attributes']) || !is_array($index['attributes'])) { + $this->message = "Index at position $i is missing required field 'attributes' (must be an array)"; return false; } // Validate key - if (!$keyValidator->isValid($indexDef['key'])) { - $this->message = "Invalid key for index at position $index: " . $keyValidator->getDescription(); + if (!$keyValidator->isValid($index['key'])) { + $this->message = "Invalid key for index at position $i: " . $keyValidator->getDescription(); return false; } // Check for duplicate keys - if (in_array($indexDef['key'], $keys)) { - $this->message = "Duplicate index key: " . $indexDef['key']; + if (in_array($index['key'], $keys)) { + $this->message = "Duplicate index key: " . $index['key']; return false; } - $keys[] = $indexDef['key']; + $keys[] = $index['key']; // Validate type - if (!in_array($indexDef['type'], $this->supportedTypes)) { - $this->message = "Invalid type for index '" . $indexDef['key'] . "': " . $indexDef['type']; + if (!in_array($index['type'], $this->supportedTypes)) { + $this->message = "Invalid type for index '" . $index['key'] . "': " . $index['type']; return false; } // Validate attributes array - if (empty($indexDef['attributes'])) { - $this->message = "Index '" . $indexDef['key'] . "' must have at least one attribute"; + if (empty($index['attributes'])) { + $this->message = "Index '" . $index['key'] . "' must have at least one attribute"; return false; } - if (count($indexDef['attributes']) > APP_LIMIT_ARRAY_PARAMS_SIZE) { - $this->message = "Index '" . $indexDef['key'] . "' cannot have more than " . APP_LIMIT_ARRAY_PARAMS_SIZE . " attributes"; + if (count($index['attributes']) > APP_LIMIT_ARRAY_PARAMS_SIZE) { + $this->message = "Index '" . $index['key'] . "' cannot have more than " . APP_LIMIT_ARRAY_PARAMS_SIZE . " attributes"; return false; } // Validate each attribute in the index - foreach ($indexDef['attributes'] as $attrIndex => $attr) { + foreach ($index['attributes'] as $attrIndex => $attr) { if (!is_string($attr)) { - $this->message = "Invalid attribute at position $attrIndex in index '" . $indexDef['key'] . "': must be a string"; + $this->message = "Invalid attribute at position $attrIndex in index '" . $index['key'] . "': must be a string"; return false; } if (!$keyValidator->isValid($attr) && !in_array($attr, ['$id', '$createdAt', '$updatedAt'])) { - $this->message = "Invalid attribute name '$attr' in index '" . $indexDef['key'] . "'"; + $this->message = "Invalid attribute name '$attr' in index '" . $index['key'] . "'"; return false; } } // Validate orders if provided - if (isset($indexDef['orders'])) { - if (!is_array($indexDef['orders'])) { - $this->message = "Index '" . $indexDef['key'] . "' orders must be an array"; + if (isset($index['orders'])) { + if (!is_array($index['orders'])) { + $this->message = "Index '" . $index['key'] . "' orders must be an array"; return false; } - foreach ($indexDef['orders'] as $order) { + // Validate orders array length matches attributes length + if (count($index['orders']) !== count($index['attributes'])) { + $this->message = "Index '" . $index['key'] . "': orders array length (" . count($index['orders']) . ") must match attributes array length (" . count($index['attributes']) . ")"; + return false; + } + + foreach ($index['orders'] as $order) { if ($order !== null && $order !== '' && !in_array($order, $this->supportedOrders)) { - $this->message = "Invalid order '$order' in index '" . $indexDef['key'] . "'. Must be 'ASC' or 'DESC'"; + $this->message = "Invalid order '$order' in index '" . $index['key'] . "'. Must be 'ASC' or 'DESC'"; return false; } } } // Validate lengths if provided - if (isset($indexDef['lengths'])) { - if (!is_array($indexDef['lengths'])) { - $this->message = "Index '" . $indexDef['key'] . "' lengths must be an array"; + if (isset($index['lengths'])) { + if (!is_array($index['lengths'])) { + $this->message = "Index '" . $index['key'] . "' lengths must be an array"; return false; } - foreach ($indexDef['lengths'] as $length) { + // MAJOR-7: Validate lengths array length matches attributes length + if (count($index['lengths']) !== count($index['attributes'])) { + $this->message = "Index '" . $index['key'] . "': lengths array length (" . count($index['lengths']) . ") must match attributes array length (" . count($index['attributes']) . ")"; + return false; + } + + foreach ($index['lengths'] as $length) { if ($length !== null && (!is_int($length) || $length < 0)) { - $this->message = "Invalid length in index '" . $indexDef['key'] . "': must be a non-negative integer or null"; + $this->message = "Invalid length in index '" . $index['key'] . "': must be a non-negative integer or null"; return false; } } From dce4c6e9f1ad4fcdb9e08196a7cafa1fbd6f8936 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Wed, 3 Dec 2025 22:15:44 +1300 Subject: [PATCH 06/20] Add more tests --- .../Legacy/DatabasesCustomServerTest.php | 990 ++++++++++++++++++ 1 file changed, 990 insertions(+) diff --git a/tests/e2e/Services/Databases/Legacy/DatabasesCustomServerTest.php b/tests/e2e/Services/Databases/Legacy/DatabasesCustomServerTest.php index 55dffb2c34..5b2b09c23f 100644 --- a/tests/e2e/Services/Databases/Legacy/DatabasesCustomServerTest.php +++ b/tests/e2e/Services/Databases/Legacy/DatabasesCustomServerTest.php @@ -7270,4 +7270,994 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-key' => $this->getProject()['apiKey'] ])); } + + public function testCreateCollectionAttributeValidationEdgeCases(): void + { + // Create database + $database = $this->client->call(Client::METHOD_POST, '/databases', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'databaseId' => ID::unique(), + 'name' => 'Test Attribute Edge Cases', + ]); + + $this->assertEquals(201, $database['headers']['status-code']); + $databaseId = $database['body']['$id']; + + // Test: Reserved attribute key ($id) + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Reserved Key Test', + 'attributes' => [ + [ + 'key' => '$id', + 'type' => Database::VAR_STRING, + 'size' => 256, + ], + ], + ]); + $this->assertEquals(400, $collection['headers']['status-code']); + + // Test: Reserved attribute key ($createdAt) + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Reserved Key Test 2', + 'attributes' => [ + [ + 'key' => '$createdAt', + 'type' => Database::VAR_DATETIME, + ], + ], + ]); + $this->assertEquals(400, $collection['headers']['status-code']); + + // Test: Integer default value with wrong type (string instead of int) + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Wrong Default Type', + 'attributes' => [ + [ + 'key' => 'count', + 'type' => Database::VAR_INTEGER, + 'default' => 'not_an_integer', + ], + ], + ]); + $this->assertEquals(400, $collection['headers']['status-code']); + + // Test: Boolean default value with wrong type + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Wrong Boolean Default', + 'attributes' => [ + [ + 'key' => 'active', + 'type' => Database::VAR_BOOLEAN, + 'default' => 'yes', + ], + ], + ]); + $this->assertEquals(400, $collection['headers']['status-code']); + + // Test: min > max for integer + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Min Greater Than Max', + 'attributes' => [ + [ + 'key' => 'score', + 'type' => Database::VAR_INTEGER, + 'min' => 100, + 'max' => 10, + ], + ], + ]); + $this->assertEquals(400, $collection['headers']['status-code']); + + // Test: Default value outside min/max range + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Default Out of Range', + 'attributes' => [ + [ + 'key' => 'score', + 'type' => Database::VAR_INTEGER, + 'min' => 0, + 'max' => 100, + 'default' => 150, + ], + ], + ]); + $this->assertEquals(400, $collection['headers']['status-code']); + + // Test: String default exceeds size + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Default Exceeds Size', + 'attributes' => [ + [ + 'key' => 'name', + 'type' => Database::VAR_STRING, + 'size' => 5, + 'default' => 'This is way too long for size 5', + ], + ], + ]); + $this->assertEquals(400, $collection['headers']['status-code']); + + // Test: 'signed' on non-numeric type + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Signed On String', + 'attributes' => [ + [ + 'key' => 'name', + 'type' => Database::VAR_STRING, + 'size' => 256, + 'signed' => true, + ], + ], + ]); + $this->assertEquals(400, $collection['headers']['status-code']); + + // Test: Array attribute with default value + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Array With Default', + 'attributes' => [ + [ + 'key' => 'tags', + 'type' => Database::VAR_STRING, + 'size' => 256, + 'array' => true, + 'default' => ['tag1', 'tag2'], + ], + ], + ]); + $this->assertEquals(400, $collection['headers']['status-code']); + + // Test: Valid integer with min/max range and default within range (should succeed) + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Valid Range', + 'attributes' => [ + [ + 'key' => 'score', + 'type' => Database::VAR_INTEGER, + 'min' => 0, + 'max' => 100, + 'default' => 50, + ], + ], + ]); + $this->assertEquals(201, $collection['headers']['status-code']); + + // Cleanup + $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + } + + public function testCreateCollectionEnumValidationEdgeCases(): void + { + // Create database + $database = $this->client->call(Client::METHOD_POST, '/databases', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'databaseId' => ID::unique(), + 'name' => 'Test Enum Edge Cases', + ]); + + $this->assertEquals(201, $database['headers']['status-code']); + $databaseId = $database['body']['$id']; + + // Test: Enum with empty elements array + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Empty Enum Elements', + 'attributes' => [ + [ + 'key' => 'status', + 'type' => Database::VAR_STRING, + 'size' => 32, + 'format' => 'enum', + 'elements' => [], + ], + ], + ]); + $this->assertEquals(400, $collection['headers']['status-code']); + + // Test: Enum with empty string element + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Empty String Element', + 'attributes' => [ + [ + 'key' => 'status', + 'type' => Database::VAR_STRING, + 'size' => 32, + 'format' => 'enum', + 'elements' => ['active', '', 'inactive'], + ], + ], + ]); + $this->assertEquals(400, $collection['headers']['status-code']); + + // Test: Enum default not in elements + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Default Not In Elements', + 'attributes' => [ + [ + 'key' => 'status', + 'type' => Database::VAR_STRING, + 'size' => 32, + 'format' => 'enum', + 'elements' => ['active', 'inactive'], + 'default' => 'pending', + ], + ], + ]); + $this->assertEquals(400, $collection['headers']['status-code']); + + // Test: Enum with valid default in elements (should succeed) + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Valid Enum Default', + 'attributes' => [ + [ + 'key' => 'status', + 'type' => Database::VAR_STRING, + 'size' => 32, + 'format' => 'enum', + 'elements' => ['active', 'inactive', 'pending'], + 'default' => 'pending', + ], + ], + ]); + $this->assertEquals(201, $collection['headers']['status-code']); + + // Cleanup + $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + } + + public function testCreateCollectionIndexValidationEdgeCases(): void + { + // Create database + $database = $this->client->call(Client::METHOD_POST, '/databases', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'databaseId' => ID::unique(), + 'name' => 'Test Index Edge Cases', + ]); + + $this->assertEquals(201, $database['headers']['status-code']); + $databaseId = $database['body']['$id']; + + // Test: Duplicate index keys + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Duplicate Index Keys', + 'attributes' => [ + [ + 'key' => 'title', + 'type' => Database::VAR_STRING, + 'size' => 256, + ], + ], + 'indexes' => [ + [ + 'key' => 'idx_title', + 'type' => Database::INDEX_KEY, + 'attributes' => ['title'], + ], + [ + 'key' => 'idx_title', + 'type' => Database::INDEX_UNIQUE, + 'attributes' => ['title'], + ], + ], + ]); + $this->assertEquals(400, $collection['headers']['status-code']); + + // Test: Invalid index type + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Invalid Index Type', + 'attributes' => [ + [ + 'key' => 'title', + 'type' => Database::VAR_STRING, + 'size' => 256, + ], + ], + 'indexes' => [ + [ + 'key' => 'idx_title', + 'type' => 'invalid_type', + 'attributes' => ['title'], + ], + ], + ]); + $this->assertEquals(400, $collection['headers']['status-code']); + + // Test: Empty attributes array in index + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Empty Index Attributes', + 'attributes' => [ + [ + 'key' => 'title', + 'type' => Database::VAR_STRING, + 'size' => 256, + ], + ], + 'indexes' => [ + [ + 'key' => 'idx_empty', + 'type' => Database::INDEX_KEY, + 'attributes' => [], + ], + ], + ]); + $this->assertEquals(400, $collection['headers']['status-code']); + + // Test: Orders array length mismatch + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Orders Length Mismatch', + 'attributes' => [ + [ + 'key' => 'title', + 'type' => Database::VAR_STRING, + 'size' => 256, + ], + [ + 'key' => 'year', + 'type' => Database::VAR_INTEGER, + ], + ], + 'indexes' => [ + [ + 'key' => 'idx_compound', + 'type' => Database::INDEX_KEY, + 'attributes' => ['title', 'year'], + 'orders' => ['ASC'], // Only one order for two attributes + ], + ], + ]); + $this->assertEquals(400, $collection['headers']['status-code']); + + // Test: Lengths array length mismatch + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Lengths Mismatch', + 'attributes' => [ + [ + 'key' => 'title', + 'type' => Database::VAR_STRING, + 'size' => 256, + ], + [ + 'key' => 'description', + 'type' => Database::VAR_STRING, + 'size' => 1024, + ], + ], + 'indexes' => [ + [ + 'key' => 'idx_compound', + 'type' => Database::INDEX_KEY, + 'attributes' => ['title', 'description'], + 'lengths' => [100], // Only one length for two attributes + ], + ], + ]); + $this->assertEquals(400, $collection['headers']['status-code']); + + // Test: Invalid order value + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Invalid Order', + 'attributes' => [ + [ + 'key' => 'title', + 'type' => Database::VAR_STRING, + 'size' => 256, + ], + ], + 'indexes' => [ + [ + 'key' => 'idx_title', + 'type' => Database::INDEX_KEY, + 'attributes' => ['title'], + 'orders' => ['INVALID'], + ], + ], + ]); + $this->assertEquals(400, $collection['headers']['status-code']); + + // Test: Valid compound index with proper orders/lengths (should succeed) + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Valid Compound Index', + 'attributes' => [ + [ + 'key' => 'title', + 'type' => Database::VAR_STRING, + 'size' => 256, + ], + [ + 'key' => 'year', + 'type' => Database::VAR_INTEGER, + ], + ], + 'indexes' => [ + [ + 'key' => 'idx_compound', + 'type' => Database::INDEX_KEY, + 'attributes' => ['title', 'year'], + 'orders' => ['ASC', 'DESC'], + ], + ], + ]); + $this->assertEquals(201, $collection['headers']['status-code']); + + // Cleanup + $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + } + + public function testCreateCollectionRelationshipValidation(): void + { + // Create database + $database = $this->client->call(Client::METHOD_POST, '/databases', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'databaseId' => ID::unique(), + 'name' => 'Test Relationship Validation', + ]); + + $this->assertEquals(201, $database['headers']['status-code']); + $databaseId = $database['body']['$id']; + + // First create a target collection for relationships + $targetCollection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::custom('authors'), + 'name' => 'Authors', + 'attributes' => [ + [ + 'key' => 'name', + 'type' => Database::VAR_STRING, + 'size' => 256, + 'required' => true, + ], + ], + ]); + $this->assertEquals(201, $targetCollection['headers']['status-code']); + + // Test: Relationship without relatedCollection + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Missing Related Collection', + 'attributes' => [ + [ + 'key' => 'author', + 'type' => Database::VAR_RELATIONSHIP, + 'relationType' => Database::RELATION_ONE_TO_ONE, + ], + ], + ]); + $this->assertEquals(400, $collection['headers']['status-code']); + + // Test: Relationship without relationType + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Missing Relation Type', + 'attributes' => [ + [ + 'key' => 'author', + 'type' => Database::VAR_RELATIONSHIP, + 'relatedCollection' => 'authors', + ], + ], + ]); + $this->assertEquals(400, $collection['headers']['status-code']); + + // Test: Invalid relationType + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Invalid Relation Type', + 'attributes' => [ + [ + 'key' => 'author', + 'type' => Database::VAR_RELATIONSHIP, + 'relatedCollection' => 'authors', + 'relationType' => 'invalid_type', + ], + ], + ]); + $this->assertEquals(400, $collection['headers']['status-code']); + + // Test: Invalid onDelete value + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Invalid OnDelete', + 'attributes' => [ + [ + 'key' => 'author', + 'type' => Database::VAR_RELATIONSHIP, + 'relatedCollection' => 'authors', + 'relationType' => Database::RELATION_ONE_TO_ONE, + 'onDelete' => 'invalid_action', + ], + ], + ]); + $this->assertEquals(400, $collection['headers']['status-code']); + + // Test: Relationship with array=true (invalid) + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Relationship As Array', + 'attributes' => [ + [ + 'key' => 'author', + 'type' => Database::VAR_RELATIONSHIP, + 'relatedCollection' => 'authors', + 'relationType' => Database::RELATION_ONE_TO_ONE, + 'array' => true, + ], + ], + ]); + $this->assertEquals(400, $collection['headers']['status-code']); + + // Test: twoWay with non-boolean value + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Invalid TwoWay', + 'attributes' => [ + [ + 'key' => 'author', + 'type' => Database::VAR_RELATIONSHIP, + 'relatedCollection' => 'authors', + 'relationType' => Database::RELATION_ONE_TO_ONE, + 'twoWay' => 'yes', + ], + ], + ]); + $this->assertEquals(400, $collection['headers']['status-code']); + + // Test: Valid relationship (should succeed) + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::custom('books'), + 'name' => 'Books', + 'attributes' => [ + [ + 'key' => 'title', + 'type' => Database::VAR_STRING, + 'size' => 256, + 'required' => true, + ], + [ + 'key' => 'author', + 'type' => Database::VAR_RELATIONSHIP, + 'relatedCollection' => 'authors', + 'relationType' => Database::RELATION_MANY_TO_ONE, + 'twoWay' => true, + 'twoWayKey' => 'books', + 'onDelete' => Database::RELATION_MUTATE_CASCADE, + ], + ], + ]); + $this->assertEquals(201, $collection['headers']['status-code']); + + // Cleanup + $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + } + + public function testCreateCollectionDatetimeValidation(): void + { + // Create database + $database = $this->client->call(Client::METHOD_POST, '/databases', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'databaseId' => ID::unique(), + 'name' => 'Test Datetime Validation', + ]); + + $this->assertEquals(201, $database['headers']['status-code']); + $databaseId = $database['body']['$id']; + + // Test: Invalid datetime default (not ISO 8601) + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Invalid Datetime Default', + 'attributes' => [ + [ + 'key' => 'publishedAt', + 'type' => Database::VAR_DATETIME, + 'default' => 'not-a-date', + ], + ], + ]); + $this->assertEquals(400, $collection['headers']['status-code']); + + // Test: Valid datetime with ISO 8601 default (should succeed) + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Valid Datetime', + 'attributes' => [ + [ + 'key' => 'publishedAt', + 'type' => Database::VAR_DATETIME, + ], + ], + ]); + $this->assertEquals(201, $collection['headers']['status-code']); + + // Cleanup + $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + } + + public function testCreateCollectionFloatValidation(): void + { + // Create database + $database = $this->client->call(Client::METHOD_POST, '/databases', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'databaseId' => ID::unique(), + 'name' => 'Test Float Validation', + ]); + + $this->assertEquals(201, $database['headers']['status-code']); + $databaseId = $database['body']['$id']; + + // Test: Float with min > max + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Float Min Greater Max', + 'attributes' => [ + [ + 'key' => 'price', + 'type' => Database::VAR_FLOAT, + 'min' => 100.50, + 'max' => 10.25, + ], + ], + ]); + $this->assertEquals(400, $collection['headers']['status-code']); + + // Test: Float default outside range + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Float Default Out of Range', + 'attributes' => [ + [ + 'key' => 'price', + 'type' => Database::VAR_FLOAT, + 'min' => 0.0, + 'max' => 100.0, + 'default' => 150.50, + ], + ], + ]); + $this->assertEquals(400, $collection['headers']['status-code']); + + // Test: Valid float with range (should succeed) + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Valid Float Range', + 'attributes' => [ + [ + 'key' => 'price', + 'type' => Database::VAR_FLOAT, + 'min' => 0.0, + 'max' => 1000.0, + 'default' => 99.99, + ], + ], + ]); + $this->assertEquals(201, $collection['headers']['status-code']); + + // Cleanup + $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + } + + public function testCreateCollectionMissingRequiredFields(): void + { + // Create database + $database = $this->client->call(Client::METHOD_POST, '/databases', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'databaseId' => ID::unique(), + 'name' => 'Test Missing Fields', + ]); + + $this->assertEquals(201, $database['headers']['status-code']); + $databaseId = $database['body']['$id']; + + // Test: Attribute without key + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Missing Attribute Key', + 'attributes' => [ + [ + 'type' => Database::VAR_STRING, + 'size' => 256, + ], + ], + ]); + $this->assertEquals(400, $collection['headers']['status-code']); + + // Test: Attribute without type + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Missing Attribute Type', + 'attributes' => [ + [ + 'key' => 'title', + 'size' => 256, + ], + ], + ]); + $this->assertEquals(400, $collection['headers']['status-code']); + + // Test: Index without key + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Missing Index Key', + 'attributes' => [ + [ + 'key' => 'title', + 'type' => Database::VAR_STRING, + 'size' => 256, + ], + ], + 'indexes' => [ + [ + 'type' => Database::INDEX_KEY, + 'attributes' => ['title'], + ], + ], + ]); + $this->assertEquals(400, $collection['headers']['status-code']); + + // Test: Index without type + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Missing Index Type', + 'attributes' => [ + [ + 'key' => 'title', + 'type' => Database::VAR_STRING, + 'size' => 256, + ], + ], + 'indexes' => [ + [ + 'key' => 'idx_title', + 'attributes' => ['title'], + ], + ], + ]); + $this->assertEquals(400, $collection['headers']['status-code']); + + // Test: Index without attributes + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Missing Index Attributes', + 'attributes' => [ + [ + 'key' => 'title', + 'type' => Database::VAR_STRING, + 'size' => 256, + ], + ], + 'indexes' => [ + [ + 'key' => 'idx_title', + 'type' => Database::INDEX_KEY, + ], + ], + ]); + $this->assertEquals(400, $collection['headers']['status-code']); + + // Cleanup + $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + } } From 252a4e12ff26bf656e23abf07964a6b38957833e Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Wed, 3 Dec 2025 22:38:37 +1300 Subject: [PATCH 07/20] Validate format on non-strings --- .../Http/Databases/Collections/Create.php | 1 - .../Utopia/Database/Validator/Attributes.php | 6 +++++- .../Legacy/DatabasesCustomServerTest.php | 18 ++++++++++++++++++ 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Create.php index a4e2265bfb..0dbe995457 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Create.php @@ -19,7 +19,6 @@ use Utopia\Database\Exception\Duplicate as DuplicateException; use Utopia\Database\Exception\Index as IndexException; use Utopia\Database\Exception\Limit as LimitException; use Utopia\Database\Exception\NotFound as NotFoundException; -use Utopia\Database\Exception\Structure as StructureException; use Utopia\Database\Helpers\ID; use Utopia\Database\Helpers\Permission; use Utopia\Database\Validator\Authorization; diff --git a/src/Appwrite/Utopia/Database/Validator/Attributes.php b/src/Appwrite/Utopia/Database/Validator/Attributes.php index fae6d6a3b0..fea4086eaf 100644 --- a/src/Appwrite/Utopia/Database/Validator/Attributes.php +++ b/src/Appwrite/Utopia/Database/Validator/Attributes.php @@ -6,7 +6,6 @@ use Utopia\Database\Database; use Utopia\Database\Validator\Datetime as DatetimeValidator; use Utopia\Database\Validator\Key; use Utopia\Validator; -use Utopia\Validator\Boolean as BooleanValidator; use Utopia\Validator\Range; use Utopia\Validator\Text; @@ -135,6 +134,11 @@ class Attributes extends Validator // Validate format if provided if (isset($attribute['format']) && $attribute['format'] !== '') { + // Format is only allowed for string type + if ($attribute['type'] !== Database::VAR_STRING) { + $this->message = "Format is only allowed for string type for attribute '" . $attribute['key'] . "'"; + return false; + } if (!in_array($attribute['format'], $this->supportedFormats)) { $this->message = "Invalid format for attribute '" . $attribute['key'] . "': " . $attribute['format']; return false; diff --git a/tests/e2e/Services/Databases/Legacy/DatabasesCustomServerTest.php b/tests/e2e/Services/Databases/Legacy/DatabasesCustomServerTest.php index 5b2b09c23f..0edcf27108 100644 --- a/tests/e2e/Services/Databases/Legacy/DatabasesCustomServerTest.php +++ b/tests/e2e/Services/Databases/Legacy/DatabasesCustomServerTest.php @@ -7454,6 +7454,24 @@ class DatabasesCustomServerTest extends Scope ]); $this->assertEquals(400, $collection['headers']['status-code']); + // Test: Format on non-string type (format is only allowed for strings) + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Format On Integer', + 'attributes' => [ + [ + 'key' => 'count', + 'type' => Database::VAR_INTEGER, + 'format' => 'enum', + ], + ], + ]); + $this->assertEquals(400, $collection['headers']['status-code']); + // Test: Valid integer with min/max range and default within range (should succeed) $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ 'content-type' => 'application/json', From e00dacf9a2b9f3da012f41cf597afc8580233da1 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Wed, 3 Dec 2025 23:24:05 +1300 Subject: [PATCH 08/20] Fix test --- .../Services/Databases/Legacy/DatabasesCustomServerTest.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/e2e/Services/Databases/Legacy/DatabasesCustomServerTest.php b/tests/e2e/Services/Databases/Legacy/DatabasesCustomServerTest.php index 0edcf27108..aff8cdde77 100644 --- a/tests/e2e/Services/Databases/Legacy/DatabasesCustomServerTest.php +++ b/tests/e2e/Services/Databases/Legacy/DatabasesCustomServerTest.php @@ -7017,7 +7017,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $collection['headers']['status-code']); - // Test: String attribute without size + // Test: String attribute without size (should fail - size is required for strings) $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -7033,8 +7033,7 @@ class DatabasesCustomServerTest extends Scope ], ]); - // Should succeed with default size - $this->assertEquals(201, $collection['headers']['status-code']); + $this->assertEquals(400, $collection['headers']['status-code']); // Test: Required attribute with default value (should fail) $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ From 331e294ef593d2e7a67057e9e252981e1c7e630e Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Thu, 4 Dec 2025 00:03:12 +1300 Subject: [PATCH 09/20] Improve min/max validation --- .../Modules/Databases/Http/Databases/Collections/Create.php | 6 +++--- src/Appwrite/Utopia/Database/Validator/Attributes.php | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Create.php index 0dbe995457..d77db3da43 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Create.php @@ -234,11 +234,11 @@ class Create extends Action $formatOptions = ['elements' => $attributeDef['elements']]; } - if (isset($attributeDef['min']) && isset($attributeDef['max'])) { + if (isset($attributeDef['min']) || isset($attributeDef['max'])) { $format = $type === Database::VAR_INTEGER ? APP_DATABASE_ATTRIBUTE_INT_RANGE : APP_DATABASE_ATTRIBUTE_FLOAT_RANGE; $formatOptions = [ - 'min' => $attributeDef['min'], - 'max' => $attributeDef['max'], + 'min' => $attributeDef['min'] ?? ($type === Database::VAR_INTEGER ? \PHP_INT_MIN : -\PHP_FLOAT_MAX), + 'max' => $attributeDef['max'] ?? ($type === Database::VAR_INTEGER ? \PHP_INT_MAX : \PHP_FLOAT_MAX), ]; } diff --git a/src/Appwrite/Utopia/Database/Validator/Attributes.php b/src/Appwrite/Utopia/Database/Validator/Attributes.php index fea4086eaf..731e6749c4 100644 --- a/src/Appwrite/Utopia/Database/Validator/Attributes.php +++ b/src/Appwrite/Utopia/Database/Validator/Attributes.php @@ -182,13 +182,14 @@ class Attributes extends Validator } // Validate min/max range for integer/float - if (isset($attribute['min']) && isset($attribute['max'])) { + if (isset($attribute['min']) || isset($attribute['max'])) { if (!in_array($attribute['type'], [Database::VAR_INTEGER, Database::VAR_FLOAT])) { $this->message = "Attribute '" . $attribute['key'] . "': min/max can only be used with integer or float types"; return false; } - if ($attribute['min'] > $attribute['max']) { + // If both are set, validate ordering + if (isset($attribute['min']) && isset($attribute['max']) && $attribute['min'] > $attribute['max']) { $this->message = "Attribute '" . $attribute['key'] . "': minimum value must be less than or equal to maximum value"; return false; } From c6ccbfaae1721f3642420ed59649a28233eabe82 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Thu, 4 Dec 2025 21:23:08 +1300 Subject: [PATCH 10/20] Remove redundant validation --- .../Http/Databases/Collections/Create.php | 26 ++++++------------- 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Create.php index d77db3da43..590bd1aafa 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Create.php @@ -24,7 +24,6 @@ use Utopia\Database\Helpers\Permission; use Utopia\Database\Validator\Authorization; use Utopia\Database\Validator\Index as IndexValidator; use Utopia\Database\Validator\Permissions; -use Utopia\Database\Validator\Structure; use Utopia\Database\Validator\UID; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\Boolean; @@ -252,19 +251,6 @@ class Create extends Action ]; } - if (!empty($format)) { - if (!Structure::hasFormat($format, $type)) { - throw new Exception($this->getFormatUnsupportedException(), "Format $format not available for $type attributes."); - } - } - - if ($required && isset($default) && $default !== null) { - throw new Exception($this->getDefaultUnsupportedException(), 'Cannot set default value for required ' . $this->getContext()); - } - - if ($array && isset($default) && $default !== null) { - throw new Exception($this->getDefaultUnsupportedException(), 'Cannot set default value for array ' . $this->getContext() . 's'); - } if (\in_array($type, Database::SPATIAL_TYPES)) { if (!$dbForProject->getAdapter()->getSupportForSpatialIndex()) { @@ -419,16 +405,20 @@ class Create extends Action /** * Cleanup on failure: delete the collection document and the underlying DB collection */ - protected function cleanup(Database $dbForProject, string $databaseKey, string $collectionKey, string $collectionId): void - { + protected function cleanup( + Database $dbForProject, + string $databaseId, + string $collectionId, + string $collectionDocumentId + ): void { try { - $dbForProject->deleteCollection($collectionKey); + $dbForProject->deleteCollection($collectionId); } catch (\Throwable) { // Ignore cleanup errors for collection deletion } try { - $dbForProject->deleteDocument($databaseKey, $collectionId); + $dbForProject->deleteDocument($databaseId, $collectionDocumentId); } catch (\Throwable) { // Ignore cleanup errors for document deletion } From df94765cf327df337aaf39ffc172a6acf1949a57 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Thu, 4 Dec 2025 23:25:15 +1300 Subject: [PATCH 11/20] Update validation --- .../Http/Databases/Collections/Create.php | 162 ++++++-------- .../Databases/Http/TablesDB/Tables/Create.php | 8 +- .../Utopia/Database/Validator/Attributes.php | 92 ++++---- .../Utopia/Database/Validator/Indexes.php | 202 ------------------ .../Legacy/DatabasesCustomServerTest.php | 21 ++ 5 files changed, 132 insertions(+), 353 deletions(-) delete mode 100644 src/Appwrite/Utopia/Database/Validator/Indexes.php diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Create.php index 590bd1aafa..7794e01106 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Create.php @@ -11,7 +11,6 @@ use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Database\Validator\Attributes as AttributesValidator; use Appwrite\Utopia\Database\Validator\CustomId; -use Appwrite\Utopia\Database\Validator\Indexes as IndexesValidator; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Database; use Utopia\Database\Document; @@ -26,9 +25,10 @@ use Utopia\Database\Validator\Index as IndexValidator; use Utopia\Database\Validator\Permissions; use Utopia\Database\Validator\UID; use Utopia\Swoole\Response as SwooleResponse; +use Utopia\Validator\ArrayList; use Utopia\Validator\Boolean; +use Utopia\Validator\JSON; use Utopia\Validator\Nullable; -use Utopia\Validator\Text; class Create extends Action { @@ -78,8 +78,8 @@ class Create extends Action ->param('permissions', null, new Nullable(new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE)), 'An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).', true) ->param('documentSecurity', false, new Boolean(true), 'Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https://appwrite.io/docs/permissions).', true) ->param('enabled', true, new Boolean(), 'Is collection enabled? When set to \'disabled\', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.', true) - ->param('attributes', [], new AttributesValidator(), 'Array of attribute definitions to create. Each attribute should contain: key (string), type (string: string, integer, float, boolean, datetime, relationship), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.', true) - ->param('indexes', [], new IndexesValidator(), 'Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of attribute keys), orders (array of ASC/DESC, optional), and lengths (array of integers, optional).', true) + ->param('attributes', [], new ArrayList(new JSON(), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Array of attribute definitions to create. Each attribute should contain: key (string), type (string: string, integer, float, boolean, datetime, relationship), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.', true) + ->param('indexes', [], new ArrayList(new JSON(), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of attribute keys), orders (array of ASC/DESC, optional), and lengths (array of integers, optional).', true) ->inject('response') ->inject('dbForProject') ->inject('queueForEvents') @@ -121,11 +121,28 @@ class Create extends Action $collectionKey = 'database_' . $database->getSequence() . '_collection_' . $collection->getSequence(); $databaseKey = 'database_' . $database->getSequence(); + $attributesValidator = new AttributesValidator( + APP_LIMIT_ARRAY_PARAMS_SIZE, + $dbForProject->getAdapter()->getSupportForSpatialAttributes() + ); + + if (!$attributesValidator->isValid($attributes)) { + $dbForProject->deleteDocument($databaseKey, $collection->getId()); + throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, $attributesValidator->getDescription()); + } + + foreach ($attributes as $attribute) { + if (($attribute['type'] ?? '') === Database::VAR_RELATIONSHIP) { + $dbForProject->deleteDocument($databaseKey, $collection->getId()); + throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, 'Relationship attributes cannot be created inline. Use the create relationship endpoint instead.'); + } + } + $collectionAttributes = []; $attributeDocuments = []; try { foreach ($attributes as $attributeDef) { - $attrDoc = $this->buildAttributeDocument($database, $collection, $attributeDef, $dbForProject); + $attrDoc = $this->buildAttributeDocument($database, $collection, $attributeDef); $collectionAttributes[] = $attrDoc['collection']; $attributeDocuments[] = $attrDoc['document']; } @@ -134,17 +151,11 @@ class Create extends Action throw $e; } - $indexLimit = $dbForProject->getLimitForIndexes(); - if (\count($indexes) > $indexLimit) { - $dbForProject->deleteDocument($databaseKey, $collection->getId()); - throw new Exception($this->getLimitException(), "Cannot create more than $indexLimit indexes for a collection"); - } - $collectionIndexes = []; $indexDocuments = []; try { foreach ($indexes as $indexDef) { - $idxDoc = $this->buildIndexDocument($database, $collection, $indexDef, $collectionAttributes, $dbForProject); + $idxDoc = $this->buildIndexDocument($database, $collection, $indexDef, $collectionAttributes); $collectionIndexes[] = $idxDoc['collection']; $indexDocuments[] = $idxDoc['document']; } @@ -153,6 +164,28 @@ class Create extends Action throw $e; } + // Validate indexes with DB adapter capabilities + $indexValidator = new IndexValidator( + $collectionAttributes, + [], + $dbForProject->getAdapter()->getMaxIndexLength(), + $dbForProject->getAdapter()->getInternalIndexesKeys(), + $dbForProject->getAdapter()->getSupportForIndexArray(), + $dbForProject->getAdapter()->getSupportForSpatialIndexNull(), + $dbForProject->getAdapter()->getSupportForSpatialIndexOrder(), + $dbForProject->getAdapter()->getSupportForVectors(), + $dbForProject->getAdapter()->getSupportForAttributes(), + $dbForProject->getAdapter()->getSupportForMultipleFulltextIndexes(), + $dbForProject->getAdapter()->getSupportForIdenticalIndexes() + ); + + foreach ($collectionIndexes as $indexDoc) { + if (!$indexValidator->isValid($indexDoc)) { + $dbForProject->deleteDocument($databaseKey, $collection->getId()); + throw new Exception($this->getInvalidIndexException(), $indexValidator->getDescription()); + } + } + try { $dbForProject->createCollection( id: $collectionKey, @@ -209,64 +242,37 @@ class Create extends Action * * @return array{collection: Document, document: Document} */ - protected function buildAttributeDocument(Document $database, Document $collection, array $attributeDef, Database $dbForProject): array - { - $key = $attributeDef['key']; - $type = $attributeDef['type']; - $size = $attributeDef['size'] ?? 0; - $required = $attributeDef['required'] ?? false; - $signed = $attributeDef['signed'] ?? true; - $array = $attributeDef['array'] ?? false; - $format = $attributeDef['format'] ?? ''; + protected function buildAttributeDocument( + Document $database, + Document $collection, + array $attribute, + ): array { + $key = $attribute['key']; + $type = $attribute['type']; + $size = $attribute['size'] ?? 0; + $required = $attribute['required'] ?? false; + $signed = $attribute['signed'] ?? true; + $array = $attribute['array'] ?? false; + $format = $attribute['format'] ?? ''; $formatOptions = []; - $filters = $attributeDef['filters'] ?? []; - $default = $attributeDef['default'] ?? null; - $options = []; + $filters = $attribute['filters'] ?? []; + $default = $attribute['default'] ?? null; - if ($type === Database::VAR_STRING) { - if ($size === 0) { - $size = 256; // Default size for strings - } + if ($format === APP_DATABASE_ATTRIBUTE_ENUM && isset($attribute['elements'])) { + $formatOptions = ['elements' => $attribute['elements']]; } - if ($format === APP_DATABASE_ATTRIBUTE_ENUM && isset($attributeDef['elements'])) { - $formatOptions = ['elements' => $attributeDef['elements']]; - } + if (isset($attribute['min']) || isset($attribute['max'])) { + $format = $type === Database::VAR_INTEGER + ? APP_DATABASE_ATTRIBUTE_INT_RANGE + : APP_DATABASE_ATTRIBUTE_FLOAT_RANGE; - if (isset($attributeDef['min']) || isset($attributeDef['max'])) { - $format = $type === Database::VAR_INTEGER ? APP_DATABASE_ATTRIBUTE_INT_RANGE : APP_DATABASE_ATTRIBUTE_FLOAT_RANGE; $formatOptions = [ - 'min' => $attributeDef['min'] ?? ($type === Database::VAR_INTEGER ? \PHP_INT_MIN : -\PHP_FLOAT_MAX), - 'max' => $attributeDef['max'] ?? ($type === Database::VAR_INTEGER ? \PHP_INT_MAX : \PHP_FLOAT_MAX), + 'min' => $attribute['min'] ?? ($type === Database::VAR_INTEGER ? \PHP_INT_MIN : -\PHP_FLOAT_MAX), + 'max' => $attribute['max'] ?? ($type === Database::VAR_INTEGER ? \PHP_INT_MAX : \PHP_FLOAT_MAX), ]; } - if ($type === Database::VAR_RELATIONSHIP) { - $options = [ - 'relatedCollection' => $attributeDef['relatedCollection'] ?? '', - 'relationType' => $attributeDef['relationType'] ?? Database::RELATION_ONE_TO_ONE, - 'twoWay' => $attributeDef['twoWay'] ?? false, - 'twoWayKey' => $attributeDef['twoWayKey'] ?? '', - 'onDelete' => $attributeDef['onDelete'] ?? Database::RELATION_MUTATE_RESTRICT, - ]; - } - - - if (\in_array($type, Database::SPATIAL_TYPES)) { - if (!$dbForProject->getAdapter()->getSupportForSpatialIndex()) { - throw new Exception($this->getFormatUnsupportedException(), "Spatial attributes are not supported by the current database"); - } - } - - if ($type === Database::VAR_RELATIONSHIP) { - $options['side'] = Database::RELATION_SIDE_PARENT; - $relatedCollection = $dbForProject->getDocument('database_' . $database->getSequence(), $options['relatedCollection'] ?? ''); - if ($relatedCollection->isEmpty()) { - $parent = $this->isCollectionsAPI() ? 'collection' : 'table'; - throw new Exception($this->getParentNotFoundException(), "The related $parent was not found."); - } - } - $collectionDoc = new Document([ '$id' => $key, 'key' => $key, @@ -279,7 +285,6 @@ class Create extends Action 'format' => $format, 'formatOptions' => $formatOptions, 'filters' => $filters, - 'options' => $options, ]); $document = new Document([ @@ -299,7 +304,6 @@ class Create extends Action 'format' => $format, 'formatOptions' => $formatOptions, 'filters' => $filters, - 'options' => $options, ]); return [ @@ -313,7 +317,7 @@ class Create extends Action * * @return array{collection: Document, document: Document} */ - protected function buildIndexDocument(Document $database, Document $collection, array $indexDef, array $attributeDocuments, Database $dbForProject): array + protected function buildIndexDocument(Document $database, Document $collection, array $indexDef, array $attributeDocuments): array { $key = $indexDef['key']; $type = $indexDef['type']; @@ -323,23 +327,13 @@ class Create extends Action $attrKeys = array_map(fn ($a) => $a->getAttribute('key'), $attributeDocuments); - $systemAttrs = ['$id', '$createdAt', '$updatedAt']; - + // Build lengths and orders based on attribute properties foreach ($indexAttributes as $i => $attr) { - if (!in_array($attr, $attrKeys) && !in_array($attr, $systemAttrs)) { - throw new Exception($this->getParentUnknownException(), "Unknown attribute: " . $attr . ". Verify the attribute name or ensure it's in the attributes list."); - } - $attrIndex = array_search($attr, $attrKeys); if ($attrIndex !== false) { $attrDoc = $attributeDocuments[$attrIndex]; - $attrType = $attrDoc->getAttribute('type'); $attrArray = $attrDoc->getAttribute('array', false); - if ($attrType === Database::VAR_RELATIONSHIP) { - throw new Exception($this->getParentInvalidTypeException(), "Cannot create an index for a relationship attribute: " . $attr); - } - if (empty($lengths[$i])) { $lengths[$i] = null; } @@ -378,24 +372,6 @@ class Create extends Action 'orders' => $orders, ]); - $indexValidator = new IndexValidator( - $attributeDocuments, - [], - $dbForProject->getAdapter()->getMaxIndexLength(), - $dbForProject->getAdapter()->getInternalIndexesKeys(), - $dbForProject->getAdapter()->getSupportForIndexArray(), - $dbForProject->getAdapter()->getSupportForSpatialIndexNull(), - $dbForProject->getAdapter()->getSupportForSpatialIndexOrder(), - $dbForProject->getAdapter()->getSupportForVectors(), - $dbForProject->getAdapter()->getSupportForAttributes(), - $dbForProject->getAdapter()->getSupportForMultipleFulltextIndexes(), - $dbForProject->getAdapter()->getSupportForIdenticalIndexes() - ); - - if (!$indexValidator->isValid($collectionDoc)) { - throw new Exception($this->getInvalidIndexException(), $indexValidator->getDescription()); - } - return [ 'collection' => $collectionDoc, 'document' => $document, diff --git a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Create.php index 060f4d418e..ee0799d028 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Create.php @@ -7,14 +7,14 @@ use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; -use Appwrite\Utopia\Database\Validator\Attributes as AttributesValidator; use Appwrite\Utopia\Database\Validator\CustomId; -use Appwrite\Utopia\Database\Validator\Indexes as IndexesValidator; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Validator\Permissions; use Utopia\Database\Validator\UID; use Utopia\Swoole\Response as SwooleResponse; +use Utopia\Validator\ArrayList; use Utopia\Validator\Boolean; +use Utopia\Validator\JSON; use Utopia\Validator\Nullable; use Utopia\Validator\Text; @@ -62,8 +62,8 @@ class Create extends CollectionCreate ->param('permissions', null, new Nullable(new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE)), 'An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).', true) ->param('rowSecurity', false, new Boolean(true), 'Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a row. [Learn more about permissions](https://appwrite.io/docs/permissions).', true) ->param('enabled', true, new Boolean(), 'Is table enabled? When set to \'disabled\', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.', true) - ->param('columns', [], new AttributesValidator(), 'Array of column definitions to create. Each column should contain: key (string), type (string: string, integer, float, boolean, datetime, relationship), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.', true) - ->param('indexes', [], new IndexesValidator(), 'Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of column keys), orders (array of ASC/DESC, optional), and lengths (array of integers, optional).', true) + ->param('columns', [], new ArrayList(new JSON(), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Array of column definitions to create. Each column should contain: key (string), type (string: string, integer, float, boolean, datetime, relationship), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.', true) + ->param('indexes', [], new ArrayList(new JSON(), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of column keys), orders (array of ASC/DESC, optional), and lengths (array of integers, optional).', true) ->inject('response') ->inject('dbForProject') ->inject('queueForEvents') diff --git a/src/Appwrite/Utopia/Database/Validator/Attributes.php b/src/Appwrite/Utopia/Database/Validator/Attributes.php index 731e6749c4..e9bd009217 100644 --- a/src/Appwrite/Utopia/Database/Validator/Attributes.php +++ b/src/Appwrite/Utopia/Database/Validator/Attributes.php @@ -6,8 +6,11 @@ use Utopia\Database\Database; use Utopia\Database\Validator\Datetime as DatetimeValidator; use Utopia\Database\Validator\Key; use Utopia\Validator; +use Utopia\Validator\Email; +use Utopia\Validator\IP; use Utopia\Validator\Range; use Utopia\Validator\Text; +use Utopia\Validator\URL; class Attributes extends Validator { @@ -23,7 +26,6 @@ class Attributes extends Validator Database::VAR_FLOAT, Database::VAR_BOOLEAN, Database::VAR_DATETIME, - Database::VAR_RELATIONSHIP, Database::VAR_POINT, Database::VAR_LINESTRING, Database::VAR_POLYGON, @@ -42,9 +44,12 @@ class Attributes extends Validator /** * @param int $maxAttributes Maximum number of attributes allowed + * @param bool $supportForSpatialAttributes Whether DB supports spatial attributes */ - public function __construct(int $maxAttributes = APP_LIMIT_ARRAY_PARAMS_SIZE) - { + public function __construct( + int $maxAttributes = APP_LIMIT_ARRAY_PARAMS_SIZE, + protected bool $supportForSpatialAttributes = true, + ) { $this->maxAttributes = $maxAttributes; } @@ -113,17 +118,23 @@ class Attributes extends Validator // Check for reserved keys $reservedKeys = ['$id', '$createdAt', '$updatedAt', '$permissions', '$collection']; - if (in_array($attribute['key'], $reservedKeys)) { + if (\in_array($attribute['key'], $reservedKeys)) { $this->message = "Attribute key '" . $attribute['key'] . "' is reserved and cannot be used"; return false; } // Validate type - if (!in_array($attribute['type'], $this->supportedTypes)) { + if (!\in_array($attribute['type'], $this->supportedTypes)) { $this->message = "Invalid type for attribute '" . $attribute['key'] . "': " . $attribute['type']; return false; } + // Validate spatial type support + if (\in_array($attribute['type'], Database::SPATIAL_TYPES) && !$this->supportForSpatialAttributes) { + $this->message = "Spatial attributes are not supported by the current database"; + return false; + } + // Validate size for string types if ($attribute['type'] === Database::VAR_STRING) { if (!isset($attribute['size']) || !is_int($attribute['size']) || $attribute['size'] < 1 || $attribute['size'] > APP_DATABASE_ATTRIBUTE_STRING_MAX_LENGTH) { @@ -213,6 +224,28 @@ class Attributes extends Validator return false; } } + + // Validate format-specific defaults + $format = $attribute['format'] ?? ''; + if ($format === APP_DATABASE_ATTRIBUTE_EMAIL) { + $emailValidator = new Email(); + if (!$emailValidator->isValid($attribute['default'])) { + $this->message = "Default value for email attribute '" . $attribute['key'] . "' must be a valid email address"; + return false; + } + } elseif ($format === APP_DATABASE_ATTRIBUTE_IP) { + $ipValidator = new IP(); + if (!$ipValidator->isValid($attribute['default'])) { + $this->message = "Default value for IP attribute '" . $attribute['key'] . "' must be a valid IP address"; + return false; + } + } elseif ($format === APP_DATABASE_ATTRIBUTE_URL) { + $urlValidator = new URL(); + if (!$urlValidator->isValid($attribute['default'])) { + $this->message = "Default value for URL attribute '" . $attribute['key'] . "' must be a valid URL"; + return false; + } + } break; case Database::VAR_INTEGER: @@ -298,55 +331,6 @@ class Attributes extends Validator } } } - - // Validate relationship options - if ($attribute['type'] === Database::VAR_RELATIONSHIP) { - // Validate array cannot be true for relationship - if (isset($attribute['array']) && $attribute['array'] === true) { - $this->message = "Relationship attribute '" . $attribute['key'] . "' cannot be an array type"; - return false; - } - - // Validate required fields for relationship - if (empty($attribute['relatedCollection'])) { - $this->message = "Relationship attribute '" . $attribute['key'] . "' must have 'relatedCollection'"; - return false; - } - - if (!isset($attribute['relationType']) || !in_array($attribute['relationType'], [ - Database::RELATION_ONE_TO_ONE, - Database::RELATION_ONE_TO_MANY, - Database::RELATION_MANY_TO_ONE, - Database::RELATION_MANY_TO_MANY, - ])) { - $this->message = "Relationship attribute '" . $attribute['key'] . "' must have valid 'relationType'"; - return false; - } - - // Validate twoWay if provided - if (isset($attribute['twoWay']) && !is_bool($attribute['twoWay'])) { - $this->message = "Invalid 'twoWay' value for relationship attribute '" . $attribute['key'] . "': must be a boolean"; - return false; - } - - // Validate twoWayKey if provided - if (!empty($attribute['twoWayKey'])) { - if (!$keyValidator->isValid($attribute['twoWayKey'])) { - $this->message = "Invalid 'twoWayKey' for relationship attribute '" . $attribute['key'] . "': " . $keyValidator->getDescription(); - return false; - } - } - - // Validate onDelete if provided - if (isset($attribute['onDelete']) && !in_array($attribute['onDelete'], [ - Database::RELATION_MUTATE_CASCADE, - Database::RELATION_MUTATE_RESTRICT, - Database::RELATION_MUTATE_SET_NULL, - ])) { - $this->message = "Invalid 'onDelete' value for relationship attribute '" . $attribute['key'] . "': must be 'cascade', 'restrict', or 'setNull'"; - return false; - } - } } return true; diff --git a/src/Appwrite/Utopia/Database/Validator/Indexes.php b/src/Appwrite/Utopia/Database/Validator/Indexes.php deleted file mode 100644 index 31c8c83835..0000000000 --- a/src/Appwrite/Utopia/Database/Validator/Indexes.php +++ /dev/null @@ -1,202 +0,0 @@ - Supported index types - */ - protected array $supportedTypes = [ - Database::INDEX_KEY, - Database::INDEX_FULLTEXT, - Database::INDEX_UNIQUE, - Database::INDEX_SPATIAL, - ]; - - /** - * @var array Supported orders - */ - protected array $supportedOrders = [ - Database::ORDER_ASC, - Database::ORDER_DESC, - ]; - - /** - * @param int $maxIndexes Maximum number of indexes allowed - */ - public function __construct(int $maxIndexes = APP_LIMIT_ARRAY_PARAMS_SIZE) - { - $this->maxIndexes = $maxIndexes; - } - - /** - * Get Description - * - * Returns validator description - * - * @return string - */ - public function getDescription(): string - { - return $this->message; - } - - /** - * Is valid - * - * @param mixed $value - * @return bool - */ - public function isValid($value): bool - { - if (!is_array($value)) { - $this->message = 'Indexes must be an array'; - return false; - } - - if (count($value) > $this->maxIndexes) { - $this->message = 'Maximum of ' . $this->maxIndexes . ' indexes allowed'; - return false; - } - - $keyValidator = new Key(); - $keys = []; - - foreach ($value as $i => $index) { - if (!is_array($index)) { - $this->message = "Index at position $i must be an object"; - return false; - } - - // Validate required fields - if (!isset($index['key'])) { - $this->message = "Index at position $i is missing required field 'key'"; - return false; - } - - if (!isset($index['type'])) { - $this->message = "Index at position $i is missing required field 'type'"; - return false; - } - - if (!isset($index['attributes']) || !is_array($index['attributes'])) { - $this->message = "Index at position $i is missing required field 'attributes' (must be an array)"; - return false; - } - - // Validate key - if (!$keyValidator->isValid($index['key'])) { - $this->message = "Invalid key for index at position $i: " . $keyValidator->getDescription(); - return false; - } - - // Check for duplicate keys - if (in_array($index['key'], $keys)) { - $this->message = "Duplicate index key: " . $index['key']; - return false; - } - $keys[] = $index['key']; - - // Validate type - if (!in_array($index['type'], $this->supportedTypes)) { - $this->message = "Invalid type for index '" . $index['key'] . "': " . $index['type']; - return false; - } - - // Validate attributes array - if (empty($index['attributes'])) { - $this->message = "Index '" . $index['key'] . "' must have at least one attribute"; - return false; - } - - if (count($index['attributes']) > APP_LIMIT_ARRAY_PARAMS_SIZE) { - $this->message = "Index '" . $index['key'] . "' cannot have more than " . APP_LIMIT_ARRAY_PARAMS_SIZE . " attributes"; - return false; - } - - // Validate each attribute in the index - foreach ($index['attributes'] as $attrIndex => $attr) { - if (!is_string($attr)) { - $this->message = "Invalid attribute at position $attrIndex in index '" . $index['key'] . "': must be a string"; - return false; - } - if (!$keyValidator->isValid($attr) && !in_array($attr, ['$id', '$createdAt', '$updatedAt'])) { - $this->message = "Invalid attribute name '$attr' in index '" . $index['key'] . "'"; - return false; - } - } - - // Validate orders if provided - if (isset($index['orders'])) { - if (!is_array($index['orders'])) { - $this->message = "Index '" . $index['key'] . "' orders must be an array"; - return false; - } - - // Validate orders array length matches attributes length - if (count($index['orders']) !== count($index['attributes'])) { - $this->message = "Index '" . $index['key'] . "': orders array length (" . count($index['orders']) . ") must match attributes array length (" . count($index['attributes']) . ")"; - return false; - } - - foreach ($index['orders'] as $order) { - if ($order !== null && $order !== '' && !in_array($order, $this->supportedOrders)) { - $this->message = "Invalid order '$order' in index '" . $index['key'] . "'. Must be 'ASC' or 'DESC'"; - return false; - } - } - } - - // Validate lengths if provided - if (isset($index['lengths'])) { - if (!is_array($index['lengths'])) { - $this->message = "Index '" . $index['key'] . "' lengths must be an array"; - return false; - } - - // MAJOR-7: Validate lengths array length matches attributes length - if (count($index['lengths']) !== count($index['attributes'])) { - $this->message = "Index '" . $index['key'] . "': lengths array length (" . count($index['lengths']) . ") must match attributes array length (" . count($index['attributes']) . ")"; - return false; - } - - foreach ($index['lengths'] as $length) { - if ($length !== null && (!is_int($length) || $length < 0)) { - $this->message = "Invalid length in index '" . $index['key'] . "': must be a non-negative integer or null"; - return false; - } - } - } - } - - return true; - } - - /** - * Is array - * - * @return bool - */ - public function isArray(): bool - { - return false; - } - - /** - * Get Type - * - * @return string - */ - public function getType(): string - { - return self::TYPE_ARRAY; - } -} diff --git a/tests/e2e/Services/Databases/Legacy/DatabasesCustomServerTest.php b/tests/e2e/Services/Databases/Legacy/DatabasesCustomServerTest.php index aff8cdde77..dd93f6252a 100644 --- a/tests/e2e/Services/Databases/Legacy/DatabasesCustomServerTest.php +++ b/tests/e2e/Services/Databases/Legacy/DatabasesCustomServerTest.php @@ -7101,6 +7101,27 @@ class DatabasesCustomServerTest extends Scope // Should succeed - system attributes can be indexed $this->assertEquals(201, $collection['headers']['status-code']); + // Test: Relationship attributes not supported inline (rejected as invalid type) + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Relationship Test', + 'attributes' => [ + [ + 'key' => 'related', + 'type' => 'relationship', + 'relatedCollection' => 'some_collection', + 'relationType' => 'oneToOne', + ], + ], + ]); + + $this->assertEquals(400, $collection['headers']['status-code'], 'Got ' . $collection['headers']['status-code'] . ': ' . json_encode($collection['body'])); + $this->assertStringContainsString('Invalid type', $collection['body']['message']); + // Cleanup $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId, array_merge([ 'content-type' => 'application/json', From 121f94676d7510d356cf76da93549a67499ae831 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Fri, 5 Dec 2025 01:03:43 +1300 Subject: [PATCH 12/20] Fix test --- .../Modules/Databases/Http/Databases/Collections/Create.php | 1 + .../e2e/Services/Databases/Legacy/DatabasesCustomServerTest.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Create.php index 7794e01106..4ce831f200 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Create.php @@ -29,6 +29,7 @@ use Utopia\Validator\ArrayList; use Utopia\Validator\Boolean; use Utopia\Validator\JSON; use Utopia\Validator\Nullable; +use Utopia\Validator\Text; class Create extends Action { diff --git a/tests/e2e/Services/Databases/Legacy/DatabasesCustomServerTest.php b/tests/e2e/Services/Databases/Legacy/DatabasesCustomServerTest.php index dd93f6252a..1d5815e144 100644 --- a/tests/e2e/Services/Databases/Legacy/DatabasesCustomServerTest.php +++ b/tests/e2e/Services/Databases/Legacy/DatabasesCustomServerTest.php @@ -7119,7 +7119,7 @@ class DatabasesCustomServerTest extends Scope ], ]); - $this->assertEquals(400, $collection['headers']['status-code'], 'Got ' . $collection['headers']['status-code'] . ': ' . json_encode($collection['body'])); + $this->assertEquals(400, $collection['headers']['status-code']); $this->assertStringContainsString('Invalid type', $collection['body']['message']); // Cleanup From 48038512b9cdc7a66fce485840b6aeb19ecf8b3c Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Fri, 5 Dec 2025 21:05:14 +1300 Subject: [PATCH 13/20] Fix index validation --- .../Http/Databases/Collections/Create.php | 8 + .../Utopia/Database/Validator/Indexes.php | 200 ++++++++++++++++++ .../Legacy/DatabasesCustomServerTest.php | 185 ---------------- 3 files changed, 208 insertions(+), 185 deletions(-) create mode 100644 src/Appwrite/Utopia/Database/Validator/Indexes.php diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Create.php index 4ce831f200..f44efad298 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Create.php @@ -11,6 +11,7 @@ use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Database\Validator\Attributes as AttributesValidator; use Appwrite\Utopia\Database\Validator\CustomId; +use Appwrite\Utopia\Database\Validator\Indexes as IndexesValidator; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Database; use Utopia\Database\Document; @@ -152,6 +153,13 @@ class Create extends Action throw $e; } + // Validate indexes + $indexesValidator = new IndexesValidator($dbForProject->getLimitForIndexes()); + if (!$indexesValidator->isValid($indexes)) { + $dbForProject->deleteDocument($databaseKey, $collection->getId()); + throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, $indexesValidator->getDescription()); + } + $collectionIndexes = []; $indexDocuments = []; try { diff --git a/src/Appwrite/Utopia/Database/Validator/Indexes.php b/src/Appwrite/Utopia/Database/Validator/Indexes.php new file mode 100644 index 0000000000..00603ab1df --- /dev/null +++ b/src/Appwrite/Utopia/Database/Validator/Indexes.php @@ -0,0 +1,200 @@ + Supported index types + */ + protected array $supportedTypes = [ + Database::INDEX_KEY, + Database::INDEX_FULLTEXT, + Database::INDEX_UNIQUE, + Database::INDEX_SPATIAL, + ]; + + /** + * @var array Supported orders + */ + protected array $supportedOrders = [ + Database::ORDER_ASC, + Database::ORDER_DESC, + ]; + + /** + * @param int $maxIndexes Maximum number of indexes allowed + */ + public function __construct( + protected int $maxIndexes = APP_LIMIT_ARRAY_PARAMS_SIZE, + ) { + } + + /** + * Get Description + * + * @return string + */ + public function getDescription(): string + { + return $this->message; + } + + /** + * Is valid + * + * @param mixed $value + * @return bool + */ + public function isValid($value): bool + { + if (!is_array($value)) { + $this->message = 'Indexes must be an array'; + return false; + } + + if (count($value) > $this->maxIndexes) { + $this->message = 'Maximum of ' . $this->maxIndexes . ' indexes allowed'; + return false; + } + + $keyValidator = new Key(); + $keys = []; + + foreach ($value as $i => $index) { + if (!is_array($index)) { + $this->message = "Index at position $i must be an object"; + return false; + } + + // Validate required fields + if (!isset($index['key']) || !is_string($index['key'])) { + $this->message = "Index at position $i is missing required field 'key'"; + return false; + } + + if (!isset($index['type']) || !is_string($index['type'])) { + $this->message = "Index at position $i is missing required field 'type'"; + return false; + } + + if (!isset($index['attributes']) || !is_array($index['attributes'])) { + $this->message = "Index at position $i is missing required field 'attributes' (must be an array)"; + return false; + } + + // Validate key format + if (!$keyValidator->isValid($index['key'])) { + $this->message = "Invalid key for index at position $i: " . $keyValidator->getDescription(); + return false; + } + + // Check for duplicate keys + if (in_array($index['key'], $keys)) { + $this->message = "Duplicate index key: " . $index['key']; + return false; + } + $keys[] = $index['key']; + + // Validate type + if (!in_array($index['type'], $this->supportedTypes)) { + $this->message = "Invalid type for index '" . $index['key'] . "': " . $index['type']; + return false; + } + + // Validate attributes array + if (empty($index['attributes'])) { + $this->message = "Index '" . $index['key'] . "' must have at least one attribute"; + return false; + } + + if (count($index['attributes']) > APP_LIMIT_ARRAY_PARAMS_SIZE) { + $this->message = "Index '" . $index['key'] . "' cannot have more than " . APP_LIMIT_ARRAY_PARAMS_SIZE . " attributes"; + return false; + } + + // Validate each attribute in the index + $systemAttrs = ['$id', '$createdAt', '$updatedAt']; + foreach ($index['attributes'] as $attrIndex => $attr) { + if (!is_string($attr)) { + $this->message = "Invalid attribute at position $attrIndex in index '" . $index['key'] . "': must be a string"; + return false; + } + if (!$keyValidator->isValid($attr) && !in_array($attr, $systemAttrs)) { + $this->message = "Invalid attribute name '$attr' in index '" . $index['key'] . "'"; + return false; + } + } + + $attrCount = count($index['attributes']); + + // Validate orders if provided + if (isset($index['orders'])) { + if (!is_array($index['orders'])) { + $this->message = "Index '" . $index['key'] . "' orders must be an array"; + return false; + } + + if (count($index['orders']) !== $attrCount) { + $this->message = "Index '" . $index['key'] . "': orders array length (" . count($index['orders']) . ") must match attributes array length ($attrCount)"; + return false; + } + + foreach ($index['orders'] as $order) { + if ($order !== null && $order !== '' && !in_array($order, $this->supportedOrders)) { + $this->message = "Invalid order '$order' in index '" . $index['key'] . "'. Must be 'ASC' or 'DESC'"; + return false; + } + } + } + + // Validate lengths if provided + if (isset($index['lengths'])) { + if (!is_array($index['lengths'])) { + $this->message = "Index '" . $index['key'] . "' lengths must be an array"; + return false; + } + + if (count($index['lengths']) !== $attrCount) { + $this->message = "Index '" . $index['key'] . "': lengths array length (" . count($index['lengths']) . ") must match attributes array length ($attrCount)"; + return false; + } + + foreach ($index['lengths'] as $length) { + if ($length !== null && (!is_int($length) || $length < 0)) { + $this->message = "Invalid length in index '" . $index['key'] . "': must be a non-negative integer or null"; + return false; + } + } + } + } + + return true; + } + + /** + * Is array + * + * @return bool + */ + public function isArray(): bool + { + return false; + } + + /** + * Get Type + * + * @return string + */ + public function getType(): string + { + return self::TYPE_ARRAY; + } +} diff --git a/tests/e2e/Services/Databases/Legacy/DatabasesCustomServerTest.php b/tests/e2e/Services/Databases/Legacy/DatabasesCustomServerTest.php index 1d5815e144..ef7091d771 100644 --- a/tests/e2e/Services/Databases/Legacy/DatabasesCustomServerTest.php +++ b/tests/e2e/Services/Databases/Legacy/DatabasesCustomServerTest.php @@ -7845,191 +7845,6 @@ class DatabasesCustomServerTest extends Scope ])); } - public function testCreateCollectionRelationshipValidation(): void - { - // Create database - $database = $this->client->call(Client::METHOD_POST, '/databases', array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - 'x-appwrite-key' => $this->getProject()['apiKey'] - ]), [ - 'databaseId' => ID::unique(), - 'name' => 'Test Relationship Validation', - ]); - - $this->assertEquals(201, $database['headers']['status-code']); - $databaseId = $database['body']['$id']; - - // First create a target collection for relationships - $targetCollection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - 'x-appwrite-key' => $this->getProject()['apiKey'] - ]), [ - 'collectionId' => ID::custom('authors'), - 'name' => 'Authors', - 'attributes' => [ - [ - 'key' => 'name', - 'type' => Database::VAR_STRING, - 'size' => 256, - 'required' => true, - ], - ], - ]); - $this->assertEquals(201, $targetCollection['headers']['status-code']); - - // Test: Relationship without relatedCollection - $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - 'x-appwrite-key' => $this->getProject()['apiKey'] - ]), [ - 'collectionId' => ID::unique(), - 'name' => 'Missing Related Collection', - 'attributes' => [ - [ - 'key' => 'author', - 'type' => Database::VAR_RELATIONSHIP, - 'relationType' => Database::RELATION_ONE_TO_ONE, - ], - ], - ]); - $this->assertEquals(400, $collection['headers']['status-code']); - - // Test: Relationship without relationType - $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - 'x-appwrite-key' => $this->getProject()['apiKey'] - ]), [ - 'collectionId' => ID::unique(), - 'name' => 'Missing Relation Type', - 'attributes' => [ - [ - 'key' => 'author', - 'type' => Database::VAR_RELATIONSHIP, - 'relatedCollection' => 'authors', - ], - ], - ]); - $this->assertEquals(400, $collection['headers']['status-code']); - - // Test: Invalid relationType - $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - 'x-appwrite-key' => $this->getProject()['apiKey'] - ]), [ - 'collectionId' => ID::unique(), - 'name' => 'Invalid Relation Type', - 'attributes' => [ - [ - 'key' => 'author', - 'type' => Database::VAR_RELATIONSHIP, - 'relatedCollection' => 'authors', - 'relationType' => 'invalid_type', - ], - ], - ]); - $this->assertEquals(400, $collection['headers']['status-code']); - - // Test: Invalid onDelete value - $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - 'x-appwrite-key' => $this->getProject()['apiKey'] - ]), [ - 'collectionId' => ID::unique(), - 'name' => 'Invalid OnDelete', - 'attributes' => [ - [ - 'key' => 'author', - 'type' => Database::VAR_RELATIONSHIP, - 'relatedCollection' => 'authors', - 'relationType' => Database::RELATION_ONE_TO_ONE, - 'onDelete' => 'invalid_action', - ], - ], - ]); - $this->assertEquals(400, $collection['headers']['status-code']); - - // Test: Relationship with array=true (invalid) - $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - 'x-appwrite-key' => $this->getProject()['apiKey'] - ]), [ - 'collectionId' => ID::unique(), - 'name' => 'Relationship As Array', - 'attributes' => [ - [ - 'key' => 'author', - 'type' => Database::VAR_RELATIONSHIP, - 'relatedCollection' => 'authors', - 'relationType' => Database::RELATION_ONE_TO_ONE, - 'array' => true, - ], - ], - ]); - $this->assertEquals(400, $collection['headers']['status-code']); - - // Test: twoWay with non-boolean value - $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - 'x-appwrite-key' => $this->getProject()['apiKey'] - ]), [ - 'collectionId' => ID::unique(), - 'name' => 'Invalid TwoWay', - 'attributes' => [ - [ - 'key' => 'author', - 'type' => Database::VAR_RELATIONSHIP, - 'relatedCollection' => 'authors', - 'relationType' => Database::RELATION_ONE_TO_ONE, - 'twoWay' => 'yes', - ], - ], - ]); - $this->assertEquals(400, $collection['headers']['status-code']); - - // Test: Valid relationship (should succeed) - $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - 'x-appwrite-key' => $this->getProject()['apiKey'] - ]), [ - 'collectionId' => ID::custom('books'), - 'name' => 'Books', - 'attributes' => [ - [ - 'key' => 'title', - 'type' => Database::VAR_STRING, - 'size' => 256, - 'required' => true, - ], - [ - 'key' => 'author', - 'type' => Database::VAR_RELATIONSHIP, - 'relatedCollection' => 'authors', - 'relationType' => Database::RELATION_MANY_TO_ONE, - 'twoWay' => true, - 'twoWayKey' => 'books', - 'onDelete' => Database::RELATION_MUTATE_CASCADE, - ], - ], - ]); - $this->assertEquals(201, $collection['headers']['status-code']); - - // Cleanup - $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId, array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - 'x-appwrite-key' => $this->getProject()['apiKey'] - ])); - } - public function testCreateCollectionDatetimeValidation(): void { // Create database From 3c9548bc9d672735e419a6da7b00d81dca78b455 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Fri, 5 Dec 2025 21:47:30 +1300 Subject: [PATCH 14/20] Update specs --- app/config/specs/open-api3-1.8.x-client.json | 114 ++-- app/config/specs/open-api3-1.8.x-console.json | 553 +++++++++-------- app/config/specs/open-api3-1.8.x-server.json | 370 ++++++------ app/config/specs/open-api3-latest-client.json | 114 ++-- .../specs/open-api3-latest-console.json | 553 +++++++++-------- app/config/specs/open-api3-latest-server.json | 370 ++++++------ app/config/specs/swagger2-1.8.x-client.json | 114 ++-- app/config/specs/swagger2-1.8.x-console.json | 556 ++++++++++-------- app/config/specs/swagger2-1.8.x-server.json | 374 ++++++------ app/config/specs/swagger2-latest-client.json | 114 ++-- app/config/specs/swagger2-latest-console.json | 556 ++++++++++-------- app/config/specs/swagger2-latest-server.json | 374 ++++++------ 12 files changed, 2242 insertions(+), 1920 deletions(-) diff --git a/app/config/specs/open-api3-1.8.x-client.json b/app/config/specs/open-api3-1.8.x-client.json index 9adb21d960..2bb33e4813 100644 --- a/app/config/specs/open-api3-1.8.x-client.json +++ b/app/config/specs/open-api3-1.8.x-client.json @@ -258,7 +258,7 @@ "x-appwrite": { "method": "listIdentities", "group": "identities", - "weight": 58, + "weight": 48, "cookies": false, "type": "", "demo": "account\/list-identities.md", @@ -328,7 +328,7 @@ "x-appwrite": { "method": "deleteIdentity", "group": "identities", - "weight": 59, + "weight": 49, "cookies": false, "type": "", "demo": "account\/delete-identity.md", @@ -517,7 +517,7 @@ "x-appwrite": { "method": "updateMFA", "group": "mfa", - "weight": 45, + "weight": 306, "cookies": false, "type": "", "demo": "account\/update-mfa.md", @@ -587,7 +587,7 @@ "x-appwrite": { "method": "createMfaAuthenticator", "group": "mfa", - "weight": 47, + "weight": 308, "cookies": false, "type": "", "demo": "account\/create-mfa-authenticator.md", @@ -707,7 +707,7 @@ "x-appwrite": { "method": "updateMfaAuthenticator", "group": "mfa", - "weight": 48, + "weight": 309, "cookies": false, "type": "", "demo": "account\/update-mfa-authenticator.md", @@ -843,7 +843,7 @@ "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", - "weight": 52, + "weight": 310, "cookies": false, "type": "", "demo": "account\/delete-mfa-authenticator.md", @@ -939,7 +939,7 @@ ] } }, - "\/account\/mfa\/challenge": { + "\/account\/mfa\/challenges": { "post": { "summary": "Create MFA challenge", "operationId": "accountCreateMfaChallenge", @@ -963,7 +963,7 @@ "x-appwrite": { "method": "createMfaChallenge", "group": "mfa", - "weight": 53, + "weight": 314, "cookies": false, "type": "", "demo": "account\/create-mfa-challenge.md", @@ -1091,7 +1091,7 @@ "x-appwrite": { "method": "updateMfaChallenge", "group": "mfa", - "weight": 54, + "weight": 315, "cookies": false, "type": "", "demo": "account\/update-mfa-challenge.md", @@ -1225,7 +1225,7 @@ "x-appwrite": { "method": "listMfaFactors", "group": "mfa", - "weight": 46, + "weight": 307, "cookies": false, "type": "", "demo": "account\/list-mfa-factors.md", @@ -1322,7 +1322,7 @@ "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", - "weight": 51, + "weight": 313, "cookies": false, "type": "", "demo": "account\/get-mfa-recovery-codes.md", @@ -1417,7 +1417,7 @@ "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", - "weight": 49, + "weight": 311, "cookies": false, "type": "", "demo": "account\/create-mfa-recovery-codes.md", @@ -1512,7 +1512,7 @@ "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", - "weight": 50, + "weight": 312, "cookies": false, "type": "", "demo": "account\/update-mfa-recovery-codes.md", @@ -2918,7 +2918,7 @@ "x-appwrite": { "method": "createPushTarget", "group": "pushTargets", - "weight": 55, + "weight": 45, "cookies": false, "type": "", "demo": "account\/create-push-target.md", @@ -2997,7 +2997,7 @@ "x-appwrite": { "method": "updatePushTarget", "group": "pushTargets", - "weight": 56, + "weight": 46, "cookies": false, "type": "", "demo": "account\/update-push-target.md", @@ -3068,7 +3068,7 @@ "x-appwrite": { "method": "deletePushTarget", "group": "pushTargets", - "weight": 57, + "weight": 47, "cookies": false, "type": "", "demo": "account\/delete-push-target.md", @@ -3879,7 +3879,7 @@ "x-appwrite": { "method": "getBrowser", "group": null, - "weight": 61, + "weight": 51, "cookies": false, "type": "location", "demo": "avatars\/get-browser.md", @@ -4005,7 +4005,7 @@ "x-appwrite": { "method": "getCreditCard", "group": null, - "weight": 60, + "weight": 50, "cookies": false, "type": "location", "demo": "avatars\/get-credit-card.md", @@ -4137,7 +4137,7 @@ "x-appwrite": { "method": "getFavicon", "group": null, - "weight": 64, + "weight": 54, "cookies": false, "type": "location", "demo": "avatars\/get-favicon.md", @@ -4195,7 +4195,7 @@ "x-appwrite": { "method": "getFlag", "group": null, - "weight": 62, + "weight": 52, "cookies": false, "type": "location", "demo": "avatars\/get-flag.md", @@ -4683,7 +4683,7 @@ "x-appwrite": { "method": "getImage", "group": null, - "weight": 63, + "weight": 53, "cookies": false, "type": "location", "demo": "avatars\/get-image.md", @@ -4765,7 +4765,7 @@ "x-appwrite": { "method": "getInitials", "group": null, - "weight": 66, + "weight": 56, "cookies": false, "type": "location", "demo": "avatars\/get-initials.md", @@ -4857,7 +4857,7 @@ "x-appwrite": { "method": "getQR", "group": null, - "weight": 65, + "weight": 55, "cookies": false, "type": "location", "demo": "avatars\/get-qr.md", @@ -4949,7 +4949,7 @@ "x-appwrite": { "method": "getScreenshot", "group": null, - "weight": 67, + "weight": 57, "cookies": false, "type": "location", "demo": "avatars\/get-screenshot.md", @@ -7370,7 +7370,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 251, + "weight": 241, "cookies": false, "type": "graphql", "demo": "graphql\/query.md", @@ -7422,7 +7422,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 250, + "weight": 240, "cookies": false, "type": "graphql", "demo": "graphql\/mutation.md", @@ -7474,7 +7474,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 71, + "weight": 61, "cookies": false, "type": "", "demo": "locale\/get.md", @@ -7526,7 +7526,7 @@ "x-appwrite": { "method": "listCodes", "group": null, - "weight": 72, + "weight": 62, "cookies": false, "type": "", "demo": "locale\/list-codes.md", @@ -7578,7 +7578,7 @@ "x-appwrite": { "method": "listContinents", "group": null, - "weight": 76, + "weight": 66, "cookies": false, "type": "", "demo": "locale\/list-continents.md", @@ -7630,7 +7630,7 @@ "x-appwrite": { "method": "listCountries", "group": null, - "weight": 73, + "weight": 63, "cookies": false, "type": "", "demo": "locale\/list-countries.md", @@ -7682,7 +7682,7 @@ "x-appwrite": { "method": "listCountriesEU", "group": null, - "weight": 74, + "weight": 64, "cookies": false, "type": "", "demo": "locale\/list-countries-eu.md", @@ -7734,7 +7734,7 @@ "x-appwrite": { "method": "listCountriesPhones", "group": null, - "weight": 75, + "weight": 65, "cookies": false, "type": "", "demo": "locale\/list-countries-phones.md", @@ -7786,7 +7786,7 @@ "x-appwrite": { "method": "listCurrencies", "group": null, - "weight": 77, + "weight": 67, "cookies": false, "type": "", "demo": "locale\/list-currencies.md", @@ -7838,7 +7838,7 @@ "x-appwrite": { "method": "listLanguages", "group": null, - "weight": 78, + "weight": 68, "cookies": false, "type": "", "demo": "locale\/list-languages.md", @@ -7890,7 +7890,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 300, + "weight": 290, "cookies": false, "type": "", "demo": "messaging\/create-subscriber.md", @@ -7973,7 +7973,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 304, + "weight": 294, "cookies": false, "type": "", "demo": "messaging\/delete-subscriber.md", @@ -8048,7 +8048,7 @@ "x-appwrite": { "method": "listFiles", "group": "files", - "weight": 161, + "weight": 151, "cookies": false, "type": "", "demo": "storage\/list-files.md", @@ -8145,7 +8145,7 @@ "x-appwrite": { "method": "createFile", "group": "files", - "weight": 160, + "weight": 150, "cookies": false, "type": "upload", "demo": "storage\/create-file.md", @@ -8244,7 +8244,7 @@ "x-appwrite": { "method": "getFile", "group": "files", - "weight": 162, + "weight": 152, "cookies": false, "type": "", "demo": "storage\/get-file.md", @@ -8316,7 +8316,7 @@ "x-appwrite": { "method": "updateFile", "group": "files", - "weight": 167, + "weight": 157, "cookies": false, "type": "", "demo": "storage\/update-file.md", @@ -8407,7 +8407,7 @@ "x-appwrite": { "method": "deleteFile", "group": "files", - "weight": 168, + "weight": 158, "cookies": false, "type": "", "demo": "storage\/delete-file.md", @@ -8474,7 +8474,7 @@ "x-appwrite": { "method": "getFileDownload", "group": "files", - "weight": 164, + "weight": 154, "cookies": false, "type": "location", "demo": "storage\/get-file-download.md", @@ -8552,7 +8552,7 @@ "x-appwrite": { "method": "getFilePreview", "group": "files", - "weight": 163, + "weight": 153, "cookies": false, "type": "location", "demo": "storage\/get-file-preview.md", @@ -8780,7 +8780,7 @@ "x-appwrite": { "method": "getFileView", "group": "files", - "weight": 165, + "weight": 155, "cookies": false, "type": "location", "demo": "storage\/get-file-view.md", @@ -10281,7 +10281,7 @@ "x-appwrite": { "method": "list", "group": "teams", - "weight": 172, + "weight": 162, "cookies": false, "type": "", "demo": "teams\/list.md", @@ -10368,7 +10368,7 @@ "x-appwrite": { "method": "create", "group": "teams", - "weight": 171, + "weight": 161, "cookies": false, "type": "", "demo": "teams\/create.md", @@ -10453,7 +10453,7 @@ "x-appwrite": { "method": "get", "group": "teams", - "weight": 173, + "weight": 163, "cookies": false, "type": "", "demo": "teams\/get.md", @@ -10515,7 +10515,7 @@ "x-appwrite": { "method": "updateName", "group": "teams", - "weight": 175, + "weight": 165, "cookies": false, "type": "", "demo": "teams\/update-name.md", @@ -10589,7 +10589,7 @@ "x-appwrite": { "method": "delete", "group": "teams", - "weight": 177, + "weight": 167, "cookies": false, "type": "", "demo": "teams\/delete.md", @@ -10653,7 +10653,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 179, + "weight": 169, "cookies": false, "type": "", "demo": "teams\/list-memberships.md", @@ -10750,7 +10750,7 @@ "x-appwrite": { "method": "createMembership", "group": "memberships", - "weight": 178, + "weight": 168, "cookies": false, "type": "", "demo": "teams\/create-membership.md", @@ -10861,7 +10861,7 @@ "x-appwrite": { "method": "getMembership", "group": "memberships", - "weight": 180, + "weight": 170, "cookies": false, "type": "", "demo": "teams\/get-membership.md", @@ -10933,7 +10933,7 @@ "x-appwrite": { "method": "updateMembership", "group": "memberships", - "weight": 181, + "weight": 171, "cookies": false, "type": "", "demo": "teams\/update-membership.md", @@ -11020,7 +11020,7 @@ "x-appwrite": { "method": "deleteMembership", "group": "memberships", - "weight": 183, + "weight": 173, "cookies": false, "type": "", "demo": "teams\/delete-membership.md", @@ -11094,7 +11094,7 @@ "x-appwrite": { "method": "updateMembershipStatus", "group": "memberships", - "weight": 182, + "weight": 172, "cookies": false, "type": "", "demo": "teams\/update-membership-status.md", @@ -11192,7 +11192,7 @@ "x-appwrite": { "method": "getPrefs", "group": "teams", - "weight": 174, + "weight": 164, "cookies": false, "type": "", "demo": "teams\/get-prefs.md", @@ -11253,7 +11253,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "teams", - "weight": 176, + "weight": 166, "cookies": false, "type": "", "demo": "teams\/update-prefs.md", diff --git a/app/config/specs/open-api3-1.8.x-console.json b/app/config/specs/open-api3-1.8.x-console.json index 365f926685..8d1f1e5880 100644 --- a/app/config/specs/open-api3-1.8.x-console.json +++ b/app/config/specs/open-api3-1.8.x-console.json @@ -295,7 +295,7 @@ "x-appwrite": { "method": "listIdentities", "group": "identities", - "weight": 58, + "weight": 48, "cookies": false, "type": "", "demo": "account\/list-identities.md", @@ -364,7 +364,7 @@ "x-appwrite": { "method": "deleteIdentity", "group": "identities", - "weight": 59, + "weight": 49, "cookies": false, "type": "", "demo": "account\/delete-identity.md", @@ -551,7 +551,7 @@ "x-appwrite": { "method": "updateMFA", "group": "mfa", - "weight": 45, + "weight": 306, "cookies": false, "type": "", "demo": "account\/update-mfa.md", @@ -620,7 +620,7 @@ "x-appwrite": { "method": "createMfaAuthenticator", "group": "mfa", - "weight": 47, + "weight": 308, "cookies": false, "type": "", "demo": "account\/create-mfa-authenticator.md", @@ -739,7 +739,7 @@ "x-appwrite": { "method": "updateMfaAuthenticator", "group": "mfa", - "weight": 48, + "weight": 309, "cookies": false, "type": "", "demo": "account\/update-mfa-authenticator.md", @@ -874,7 +874,7 @@ "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", - "weight": 52, + "weight": 310, "cookies": false, "type": "", "demo": "account\/delete-mfa-authenticator.md", @@ -969,7 +969,7 @@ ] } }, - "\/account\/mfa\/challenge": { + "\/account\/mfa\/challenges": { "post": { "summary": "Create MFA challenge", "operationId": "accountCreateMfaChallenge", @@ -993,7 +993,7 @@ "x-appwrite": { "method": "createMfaChallenge", "group": "mfa", - "weight": 53, + "weight": 314, "cookies": false, "type": "", "demo": "account\/create-mfa-challenge.md", @@ -1121,7 +1121,7 @@ "x-appwrite": { "method": "updateMfaChallenge", "group": "mfa", - "weight": 54, + "weight": 315, "cookies": false, "type": "", "demo": "account\/update-mfa-challenge.md", @@ -1254,7 +1254,7 @@ "x-appwrite": { "method": "listMfaFactors", "group": "mfa", - "weight": 46, + "weight": 307, "cookies": false, "type": "", "demo": "account\/list-mfa-factors.md", @@ -1350,7 +1350,7 @@ "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", - "weight": 51, + "weight": 313, "cookies": false, "type": "", "demo": "account\/get-mfa-recovery-codes.md", @@ -1444,7 +1444,7 @@ "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", - "weight": 49, + "weight": 311, "cookies": false, "type": "", "demo": "account\/create-mfa-recovery-codes.md", @@ -1538,7 +1538,7 @@ "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", - "weight": 50, + "weight": 312, "cookies": false, "type": "", "demo": "account\/update-mfa-recovery-codes.md", @@ -2930,7 +2930,7 @@ "x-appwrite": { "method": "createPushTarget", "group": "pushTargets", - "weight": 55, + "weight": 45, "cookies": false, "type": "", "demo": "account\/create-push-target.md", @@ -3008,7 +3008,7 @@ "x-appwrite": { "method": "updatePushTarget", "group": "pushTargets", - "weight": 56, + "weight": 46, "cookies": false, "type": "", "demo": "account\/update-push-target.md", @@ -3078,7 +3078,7 @@ "x-appwrite": { "method": "deletePushTarget", "group": "pushTargets", - "weight": 57, + "weight": 47, "cookies": false, "type": "", "demo": "account\/delete-push-target.md", @@ -3884,7 +3884,7 @@ "x-appwrite": { "method": "getBrowser", "group": null, - "weight": 61, + "weight": 51, "cookies": false, "type": "location", "demo": "avatars\/get-browser.md", @@ -4010,7 +4010,7 @@ "x-appwrite": { "method": "getCreditCard", "group": null, - "weight": 60, + "weight": 50, "cookies": false, "type": "location", "demo": "avatars\/get-credit-card.md", @@ -4142,7 +4142,7 @@ "x-appwrite": { "method": "getFavicon", "group": null, - "weight": 64, + "weight": 54, "cookies": false, "type": "location", "demo": "avatars\/get-favicon.md", @@ -4200,7 +4200,7 @@ "x-appwrite": { "method": "getFlag", "group": null, - "weight": 62, + "weight": 52, "cookies": false, "type": "location", "demo": "avatars\/get-flag.md", @@ -4688,7 +4688,7 @@ "x-appwrite": { "method": "getImage", "group": null, - "weight": 63, + "weight": 53, "cookies": false, "type": "location", "demo": "avatars\/get-image.md", @@ -4770,7 +4770,7 @@ "x-appwrite": { "method": "getInitials", "group": null, - "weight": 66, + "weight": 56, "cookies": false, "type": "location", "demo": "avatars\/get-initials.md", @@ -4862,7 +4862,7 @@ "x-appwrite": { "method": "getQR", "group": null, - "weight": 65, + "weight": 55, "cookies": false, "type": "location", "demo": "avatars\/get-qr.md", @@ -4954,7 +4954,7 @@ "x-appwrite": { "method": "getScreenshot", "group": null, - "weight": 67, + "weight": 57, "cookies": false, "type": "location", "demo": "avatars\/get-screenshot.md", @@ -5673,7 +5673,7 @@ "x-appwrite": { "method": "chat", "group": "console", - "weight": 253, + "weight": 243, "cookies": false, "type": "", "demo": "assistant\/chat.md", @@ -5808,7 +5808,7 @@ "x-appwrite": { "method": "variables", "group": "console", - "weight": 252, + "weight": 242, "cookies": false, "type": "", "demo": "console\/variables.md", @@ -7071,6 +7071,22 @@ "type": "boolean", "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", "x-example": false + }, + "attributes": { + "type": "array", + "description": "Array of attribute definitions to create. Each attribute should contain: key (string), type (string: string, integer, float, boolean, datetime, relationship), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.", + "x-example": null, + "items": { + "type": "object" + } + }, + "indexes": { + "type": "array", + "description": "Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of attribute keys), orders (array of ASC\/DESC, optional), and lengths (array of integers, optional).", + "x-example": null, + "items": { + "type": "object" + } } }, "required": [ @@ -15663,7 +15679,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 251, + "weight": 241, "cookies": false, "type": "graphql", "demo": "graphql\/query.md", @@ -15715,7 +15731,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 250, + "weight": 240, "cookies": false, "type": "graphql", "demo": "graphql\/mutation.md", @@ -15767,7 +15783,7 @@ "x-appwrite": { "method": "get", "group": "health", - "weight": 79, + "weight": 69, "cookies": false, "type": "", "demo": "health\/get.md", @@ -15816,7 +15832,7 @@ "x-appwrite": { "method": "getAntivirus", "group": "health", - "weight": 100, + "weight": 90, "cookies": false, "type": "", "demo": "health\/get-antivirus.md", @@ -15865,7 +15881,7 @@ "x-appwrite": { "method": "getCache", "group": "health", - "weight": 82, + "weight": 72, "cookies": false, "type": "", "demo": "health\/get-cache.md", @@ -15914,7 +15930,7 @@ "x-appwrite": { "method": "getCertificate", "group": "health", - "weight": 87, + "weight": 77, "cookies": false, "type": "", "demo": "health\/get-certificate.md", @@ -15974,7 +15990,7 @@ "x-appwrite": { "method": "getDB", "group": "health", - "weight": 81, + "weight": 71, "cookies": false, "type": "", "demo": "health\/get-db.md", @@ -16023,7 +16039,7 @@ "x-appwrite": { "method": "getPubSub", "group": "health", - "weight": 83, + "weight": 73, "cookies": false, "type": "", "demo": "health\/get-pub-sub.md", @@ -16072,7 +16088,7 @@ "x-appwrite": { "method": "getQueueBuilds", "group": "queue", - "weight": 89, + "weight": 79, "cookies": false, "type": "", "demo": "health\/get-queue-builds.md", @@ -16134,7 +16150,7 @@ "x-appwrite": { "method": "getQueueCertificates", "group": "queue", - "weight": 88, + "weight": 78, "cookies": false, "type": "", "demo": "health\/get-queue-certificates.md", @@ -16196,7 +16212,7 @@ "x-appwrite": { "method": "getQueueDatabases", "group": "queue", - "weight": 90, + "weight": 80, "cookies": false, "type": "", "demo": "health\/get-queue-databases.md", @@ -16269,7 +16285,7 @@ "x-appwrite": { "method": "getQueueDeletes", "group": "queue", - "weight": 91, + "weight": 81, "cookies": false, "type": "", "demo": "health\/get-queue-deletes.md", @@ -16331,7 +16347,7 @@ "x-appwrite": { "method": "getFailedJobs", "group": "queue", - "weight": 101, + "weight": 91, "cookies": false, "type": "", "demo": "health\/get-failed-jobs.md", @@ -16419,7 +16435,7 @@ "x-appwrite": { "method": "getQueueFunctions", "group": "queue", - "weight": 95, + "weight": 85, "cookies": false, "type": "", "demo": "health\/get-queue-functions.md", @@ -16481,7 +16497,7 @@ "x-appwrite": { "method": "getQueueLogs", "group": "queue", - "weight": 86, + "weight": 76, "cookies": false, "type": "", "demo": "health\/get-queue-logs.md", @@ -16543,7 +16559,7 @@ "x-appwrite": { "method": "getQueueMails", "group": "queue", - "weight": 92, + "weight": 82, "cookies": false, "type": "", "demo": "health\/get-queue-mails.md", @@ -16605,7 +16621,7 @@ "x-appwrite": { "method": "getQueueMessaging", "group": "queue", - "weight": 93, + "weight": 83, "cookies": false, "type": "", "demo": "health\/get-queue-messaging.md", @@ -16667,7 +16683,7 @@ "x-appwrite": { "method": "getQueueMigrations", "group": "queue", - "weight": 94, + "weight": 84, "cookies": false, "type": "", "demo": "health\/get-queue-migrations.md", @@ -16729,7 +16745,7 @@ "x-appwrite": { "method": "getQueueStatsResources", "group": "queue", - "weight": 96, + "weight": 86, "cookies": false, "type": "", "demo": "health\/get-queue-stats-resources.md", @@ -16791,7 +16807,7 @@ "x-appwrite": { "method": "getQueueUsage", "group": "queue", - "weight": 97, + "weight": 87, "cookies": false, "type": "", "demo": "health\/get-queue-usage.md", @@ -16853,7 +16869,7 @@ "x-appwrite": { "method": "getQueueWebhooks", "group": "queue", - "weight": 85, + "weight": 75, "cookies": false, "type": "", "demo": "health\/get-queue-webhooks.md", @@ -16915,7 +16931,7 @@ "x-appwrite": { "method": "getStorage", "group": "storage", - "weight": 99, + "weight": 89, "cookies": false, "type": "", "demo": "health\/get-storage.md", @@ -16964,7 +16980,7 @@ "x-appwrite": { "method": "getStorageLocal", "group": "storage", - "weight": 98, + "weight": 88, "cookies": false, "type": "", "demo": "health\/get-storage-local.md", @@ -17013,7 +17029,7 @@ "x-appwrite": { "method": "getTime", "group": "health", - "weight": 84, + "weight": 74, "cookies": false, "type": "", "demo": "health\/get-time.md", @@ -17062,7 +17078,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 71, + "weight": 61, "cookies": false, "type": "", "demo": "locale\/get.md", @@ -17114,7 +17130,7 @@ "x-appwrite": { "method": "listCodes", "group": null, - "weight": 72, + "weight": 62, "cookies": false, "type": "", "demo": "locale\/list-codes.md", @@ -17166,7 +17182,7 @@ "x-appwrite": { "method": "listContinents", "group": null, - "weight": 76, + "weight": 66, "cookies": false, "type": "", "demo": "locale\/list-continents.md", @@ -17218,7 +17234,7 @@ "x-appwrite": { "method": "listCountries", "group": null, - "weight": 73, + "weight": 63, "cookies": false, "type": "", "demo": "locale\/list-countries.md", @@ -17270,7 +17286,7 @@ "x-appwrite": { "method": "listCountriesEU", "group": null, - "weight": 74, + "weight": 64, "cookies": false, "type": "", "demo": "locale\/list-countries-eu.md", @@ -17322,7 +17338,7 @@ "x-appwrite": { "method": "listCountriesPhones", "group": null, - "weight": 75, + "weight": 65, "cookies": false, "type": "", "demo": "locale\/list-countries-phones.md", @@ -17374,7 +17390,7 @@ "x-appwrite": { "method": "listCurrencies", "group": null, - "weight": 77, + "weight": 67, "cookies": false, "type": "", "demo": "locale\/list-currencies.md", @@ -17426,7 +17442,7 @@ "x-appwrite": { "method": "listLanguages", "group": null, - "weight": 78, + "weight": 68, "cookies": false, "type": "", "demo": "locale\/list-languages.md", @@ -17478,7 +17494,7 @@ "x-appwrite": { "method": "listMessages", "group": "messages", - "weight": 308, + "weight": 298, "cookies": false, "type": "", "demo": "messaging\/list-messages.md", @@ -17565,7 +17581,7 @@ "x-appwrite": { "method": "createEmail", "group": "messages", - "weight": 305, + "weight": 295, "cookies": false, "type": "", "demo": "messaging\/create-email.md", @@ -17710,7 +17726,7 @@ "x-appwrite": { "method": "updateEmail", "group": "messages", - "weight": 312, + "weight": 302, "cookies": false, "type": "", "demo": "messaging\/update-email.md", @@ -17867,7 +17883,7 @@ "x-appwrite": { "method": "createPush", "group": "messages", - "weight": 307, + "weight": 297, "cookies": false, "type": "", "demo": "messaging\/create-push.md", @@ -18043,7 +18059,7 @@ "x-appwrite": { "method": "updatePush", "group": "messages", - "weight": 314, + "weight": 304, "cookies": false, "type": "", "demo": "messaging\/update-push.md", @@ -18239,7 +18255,7 @@ "x-appwrite": { "method": "createSms", "group": "messages", - "weight": 306, + "weight": 296, "cookies": false, "type": "", "demo": "messaging\/create-sms.md", @@ -18417,7 +18433,7 @@ "x-appwrite": { "method": "updateSms", "group": "messages", - "weight": 313, + "weight": 303, "cookies": false, "type": "", "demo": "messaging\/update-sms.md", @@ -18601,7 +18617,7 @@ "x-appwrite": { "method": "getMessage", "group": "messages", - "weight": 311, + "weight": 301, "cookies": false, "type": "", "demo": "messaging\/get-message.md", @@ -18654,7 +18670,7 @@ "x-appwrite": { "method": "delete", "group": "messages", - "weight": 315, + "weight": 305, "cookies": false, "type": "", "demo": "messaging\/delete.md", @@ -18716,7 +18732,7 @@ "x-appwrite": { "method": "listMessageLogs", "group": "logs", - "weight": 309, + "weight": 299, "cookies": false, "type": "", "demo": "messaging\/list-message-logs.md", @@ -18802,7 +18818,7 @@ "x-appwrite": { "method": "listTargets", "group": "messages", - "weight": 310, + "weight": 300, "cookies": false, "type": "", "demo": "messaging\/list-targets.md", @@ -18888,7 +18904,7 @@ "x-appwrite": { "method": "listProviders", "group": "providers", - "weight": 279, + "weight": 269, "cookies": false, "type": "", "demo": "messaging\/list-providers.md", @@ -18975,7 +18991,7 @@ "x-appwrite": { "method": "createApnsProvider", "group": "providers", - "weight": 278, + "weight": 268, "cookies": false, "type": "", "demo": "messaging\/create-apns-provider.md", @@ -19151,7 +19167,7 @@ "x-appwrite": { "method": "updateApnsProvider", "group": "providers", - "weight": 292, + "weight": 282, "cookies": false, "type": "", "demo": "messaging\/update-apns-provider.md", @@ -19329,7 +19345,7 @@ "x-appwrite": { "method": "createFcmProvider", "group": "providers", - "weight": 277, + "weight": 267, "cookies": false, "type": "", "demo": "messaging\/create-fcm-provider.md", @@ -19478,7 +19494,7 @@ "x-appwrite": { "method": "updateFcmProvider", "group": "providers", - "weight": 291, + "weight": 281, "cookies": false, "type": "", "demo": "messaging\/update-fcm-provider.md", @@ -19628,7 +19644,7 @@ "x-appwrite": { "method": "createMailgunProvider", "group": "providers", - "weight": 268, + "weight": 258, "cookies": false, "type": "", "demo": "messaging\/create-mailgun-provider.md", @@ -19745,7 +19761,7 @@ "x-appwrite": { "method": "updateMailgunProvider", "group": "providers", - "weight": 282, + "weight": 272, "cookies": false, "type": "", "demo": "messaging\/update-mailgun-provider.md", @@ -19865,7 +19881,7 @@ "x-appwrite": { "method": "createMsg91Provider", "group": "providers", - "weight": 272, + "weight": 262, "cookies": false, "type": "", "demo": "messaging\/create-msg-91-provider.md", @@ -19961,7 +19977,7 @@ "x-appwrite": { "method": "updateMsg91Provider", "group": "providers", - "weight": 286, + "weight": 276, "cookies": false, "type": "", "demo": "messaging\/update-msg-91-provider.md", @@ -20060,7 +20076,7 @@ "x-appwrite": { "method": "createResendProvider", "group": "providers", - "weight": 270, + "weight": 260, "cookies": false, "type": "", "demo": "messaging\/create-resend-provider.md", @@ -20166,7 +20182,7 @@ "x-appwrite": { "method": "updateResendProvider", "group": "providers", - "weight": 284, + "weight": 274, "cookies": false, "type": "", "demo": "messaging\/update-resend-provider.md", @@ -20275,7 +20291,7 @@ "x-appwrite": { "method": "createSendgridProvider", "group": "providers", - "weight": 269, + "weight": 259, "cookies": false, "type": "", "demo": "messaging\/create-sendgrid-provider.md", @@ -20381,7 +20397,7 @@ "x-appwrite": { "method": "updateSendgridProvider", "group": "providers", - "weight": 283, + "weight": 273, "cookies": false, "type": "", "demo": "messaging\/update-sendgrid-provider.md", @@ -20490,7 +20506,7 @@ "x-appwrite": { "method": "createSmtpProvider", "group": "providers", - "weight": 271, + "weight": 261, "cookies": false, "type": "", "demo": "messaging\/create-smtp-provider.md", @@ -20718,7 +20734,7 @@ "x-appwrite": { "method": "updateSmtpProvider", "group": "providers", - "weight": 285, + "weight": 275, "cookies": false, "type": "", "demo": "messaging\/update-smtp-provider.md", @@ -20946,7 +20962,7 @@ "x-appwrite": { "method": "createTelesignProvider", "group": "providers", - "weight": 273, + "weight": 263, "cookies": false, "type": "", "demo": "messaging\/create-telesign-provider.md", @@ -21042,7 +21058,7 @@ "x-appwrite": { "method": "updateTelesignProvider", "group": "providers", - "weight": 287, + "weight": 277, "cookies": false, "type": "", "demo": "messaging\/update-telesign-provider.md", @@ -21141,7 +21157,7 @@ "x-appwrite": { "method": "createTextmagicProvider", "group": "providers", - "weight": 274, + "weight": 264, "cookies": false, "type": "", "demo": "messaging\/create-textmagic-provider.md", @@ -21237,7 +21253,7 @@ "x-appwrite": { "method": "updateTextmagicProvider", "group": "providers", - "weight": 288, + "weight": 278, "cookies": false, "type": "", "demo": "messaging\/update-textmagic-provider.md", @@ -21336,7 +21352,7 @@ "x-appwrite": { "method": "createTwilioProvider", "group": "providers", - "weight": 275, + "weight": 265, "cookies": false, "type": "", "demo": "messaging\/create-twilio-provider.md", @@ -21432,7 +21448,7 @@ "x-appwrite": { "method": "updateTwilioProvider", "group": "providers", - "weight": 289, + "weight": 279, "cookies": false, "type": "", "demo": "messaging\/update-twilio-provider.md", @@ -21531,7 +21547,7 @@ "x-appwrite": { "method": "createVonageProvider", "group": "providers", - "weight": 276, + "weight": 266, "cookies": false, "type": "", "demo": "messaging\/create-vonage-provider.md", @@ -21627,7 +21643,7 @@ "x-appwrite": { "method": "updateVonageProvider", "group": "providers", - "weight": 290, + "weight": 280, "cookies": false, "type": "", "demo": "messaging\/update-vonage-provider.md", @@ -21726,7 +21742,7 @@ "x-appwrite": { "method": "getProvider", "group": "providers", - "weight": 281, + "weight": 271, "cookies": false, "type": "", "demo": "messaging\/get-provider.md", @@ -21779,7 +21795,7 @@ "x-appwrite": { "method": "deleteProvider", "group": "providers", - "weight": 293, + "weight": 283, "cookies": false, "type": "", "demo": "messaging\/delete-provider.md", @@ -21841,7 +21857,7 @@ "x-appwrite": { "method": "listProviderLogs", "group": "providers", - "weight": 280, + "weight": 270, "cookies": false, "type": "", "demo": "messaging\/list-provider-logs.md", @@ -21927,7 +21943,7 @@ "x-appwrite": { "method": "listSubscriberLogs", "group": "subscribers", - "weight": 302, + "weight": 292, "cookies": false, "type": "", "demo": "messaging\/list-subscriber-logs.md", @@ -22013,7 +22029,7 @@ "x-appwrite": { "method": "listTopics", "group": "topics", - "weight": 295, + "weight": 285, "cookies": false, "type": "", "demo": "messaging\/list-topics.md", @@ -22098,7 +22114,7 @@ "x-appwrite": { "method": "createTopic", "group": "topics", - "weight": 294, + "weight": 284, "cookies": false, "type": "", "demo": "messaging\/create-topic.md", @@ -22181,7 +22197,7 @@ "x-appwrite": { "method": "getTopic", "group": "topics", - "weight": 297, + "weight": 287, "cookies": false, "type": "", "demo": "messaging\/get-topic.md", @@ -22241,7 +22257,7 @@ "x-appwrite": { "method": "updateTopic", "group": "topics", - "weight": 298, + "weight": 288, "cookies": false, "type": "", "demo": "messaging\/update-topic.md", @@ -22320,7 +22336,7 @@ "x-appwrite": { "method": "deleteTopic", "group": "topics", - "weight": 299, + "weight": 289, "cookies": false, "type": "", "demo": "messaging\/delete-topic.md", @@ -22382,7 +22398,7 @@ "x-appwrite": { "method": "listTopicLogs", "group": "topics", - "weight": 296, + "weight": 286, "cookies": false, "type": "", "demo": "messaging\/list-topic-logs.md", @@ -22468,7 +22484,7 @@ "x-appwrite": { "method": "listSubscribers", "group": "subscribers", - "weight": 301, + "weight": 291, "cookies": false, "type": "", "demo": "messaging\/list-subscribers.md", @@ -22563,7 +22579,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 300, + "weight": 290, "cookies": false, "type": "", "demo": "messaging\/create-subscriber.md", @@ -22653,7 +22669,7 @@ "x-appwrite": { "method": "getSubscriber", "group": "subscribers", - "weight": 303, + "weight": 293, "cookies": false, "type": "", "demo": "messaging\/get-subscriber.md", @@ -22716,7 +22732,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 304, + "weight": 294, "cookies": false, "type": "", "demo": "messaging\/delete-subscriber.md", @@ -22791,7 +22807,7 @@ "x-appwrite": { "method": "list", "group": null, - "weight": 260, + "weight": 250, "cookies": false, "type": "", "demo": "migrations\/list.md", @@ -22876,7 +22892,7 @@ "x-appwrite": { "method": "createAppwriteMigration", "group": null, - "weight": 254, + "weight": 244, "cookies": false, "type": "", "demo": "migrations\/create-appwrite-migration.md", @@ -22964,7 +22980,7 @@ "x-appwrite": { "method": "getAppwriteReport", "group": null, - "weight": 262, + "weight": 252, "cookies": false, "type": "", "demo": "migrations\/get-appwrite-report.md", @@ -23057,7 +23073,7 @@ "x-appwrite": { "method": "createCSVExport", "group": null, - "weight": 259, + "weight": 249, "cookies": false, "type": "", "demo": "migrations\/create-csv-export.md", @@ -23171,7 +23187,7 @@ "x-appwrite": { "method": "createCSVImport", "group": null, - "weight": 258, + "weight": 248, "cookies": false, "type": "", "demo": "migrations\/create-csv-import.md", @@ -23255,7 +23271,7 @@ "x-appwrite": { "method": "createFirebaseMigration", "group": null, - "weight": 255, + "weight": 245, "cookies": false, "type": "", "demo": "migrations\/create-firebase-migration.md", @@ -23331,7 +23347,7 @@ "x-appwrite": { "method": "getFirebaseReport", "group": null, - "weight": 263, + "weight": 253, "cookies": false, "type": "", "demo": "migrations\/get-firebase-report.md", @@ -23403,7 +23419,7 @@ "x-appwrite": { "method": "createNHostMigration", "group": null, - "weight": 257, + "weight": 247, "cookies": false, "type": "", "demo": "migrations\/create-n-host-migration.md", @@ -23514,7 +23530,7 @@ "x-appwrite": { "method": "getNHostReport", "group": null, - "weight": 265, + "weight": 255, "cookies": false, "type": "", "demo": "migrations\/get-n-host-report.md", @@ -23647,7 +23663,7 @@ "x-appwrite": { "method": "createSupabaseMigration", "group": null, - "weight": 256, + "weight": 246, "cookies": false, "type": "", "demo": "migrations\/create-supabase-migration.md", @@ -23752,7 +23768,7 @@ "x-appwrite": { "method": "getSupabaseReport", "group": null, - "weight": 264, + "weight": 254, "cookies": false, "type": "", "demo": "migrations\/get-supabase-report.md", @@ -23876,7 +23892,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 261, + "weight": 251, "cookies": false, "type": "", "demo": "migrations\/get.md", @@ -23934,7 +23950,7 @@ "x-appwrite": { "method": "retry", "group": null, - "weight": 266, + "weight": 256, "cookies": false, "type": "", "demo": "migrations\/retry.md", @@ -23985,7 +24001,7 @@ "x-appwrite": { "method": "delete", "group": null, - "weight": 267, + "weight": 257, "cookies": false, "type": "", "demo": "migrations\/delete.md", @@ -24045,7 +24061,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 149, + "weight": 139, "cookies": false, "type": "", "demo": "project\/get-usage.md", @@ -24133,7 +24149,7 @@ "x-appwrite": { "method": "listVariables", "group": null, - "weight": 151, + "weight": 141, "cookies": false, "type": "", "demo": "project\/list-variables.md", @@ -24179,7 +24195,7 @@ "x-appwrite": { "method": "createVariable", "group": null, - "weight": 150, + "weight": 140, "cookies": false, "type": "", "demo": "project\/create-variable.md", @@ -24257,7 +24273,7 @@ "x-appwrite": { "method": "getVariable", "group": null, - "weight": 152, + "weight": 142, "cookies": false, "type": "", "demo": "project\/get-variable.md", @@ -24315,7 +24331,7 @@ "x-appwrite": { "method": "updateVariable", "group": null, - "weight": 153, + "weight": 143, "cookies": false, "type": "", "demo": "project\/update-variable.md", @@ -24397,7 +24413,7 @@ "x-appwrite": { "method": "deleteVariable", "group": null, - "weight": 154, + "weight": 144, "cookies": false, "type": "", "demo": "project\/delete-variable.md", @@ -24540,7 +24556,7 @@ "x-appwrite": { "method": "create", "group": "projects", - "weight": 103, + "weight": 93, "cookies": false, "type": "", "demo": "projects\/create.md", @@ -24674,7 +24690,7 @@ "x-appwrite": { "method": "get", "group": "projects", - "weight": 104, + "weight": 94, "cookies": false, "type": "", "demo": "projects\/get.md", @@ -24732,7 +24748,7 @@ "x-appwrite": { "method": "update", "group": "projects", - "weight": 105, + "weight": 95, "cookies": false, "type": "", "demo": "projects\/update.md", @@ -24847,7 +24863,7 @@ "x-appwrite": { "method": "delete", "group": "projects", - "weight": 122, + "weight": 112, "cookies": false, "type": "", "demo": "projects\/delete.md", @@ -24907,7 +24923,7 @@ "x-appwrite": { "method": "updateApiStatus", "group": "projects", - "weight": 109, + "weight": 99, "cookies": false, "type": "", "demo": "projects\/update-api-status.md", @@ -25061,7 +25077,7 @@ "x-appwrite": { "method": "updateApiStatusAll", "group": "projects", - "weight": 110, + "weight": 100, "cookies": false, "type": "", "demo": "projects\/update-api-status-all.md", @@ -25198,7 +25214,7 @@ "x-appwrite": { "method": "updateAuthDuration", "group": "auth", - "weight": 115, + "weight": 105, "cookies": false, "type": "", "demo": "projects\/update-auth-duration.md", @@ -25277,7 +25293,7 @@ "x-appwrite": { "method": "updateAuthLimit", "group": "auth", - "weight": 114, + "weight": 104, "cookies": false, "type": "", "demo": "projects\/update-auth-limit.md", @@ -25356,7 +25372,7 @@ "x-appwrite": { "method": "updateAuthSessionsLimit", "group": "auth", - "weight": 120, + "weight": 110, "cookies": false, "type": "", "demo": "projects\/update-auth-sessions-limit.md", @@ -25435,7 +25451,7 @@ "x-appwrite": { "method": "updateMembershipsPrivacy", "group": "auth", - "weight": 113, + "weight": 103, "cookies": false, "type": "", "demo": "projects\/update-memberships-privacy.md", @@ -25526,7 +25542,7 @@ "x-appwrite": { "method": "updateMockNumbers", "group": "auth", - "weight": 121, + "weight": 111, "cookies": false, "type": "", "demo": "projects\/update-mock-numbers.md", @@ -25608,7 +25624,7 @@ "x-appwrite": { "method": "updateAuthPasswordDictionary", "group": "auth", - "weight": 118, + "weight": 108, "cookies": false, "type": "", "demo": "projects\/update-auth-password-dictionary.md", @@ -25687,7 +25703,7 @@ "x-appwrite": { "method": "updateAuthPasswordHistory", "group": "auth", - "weight": 117, + "weight": 107, "cookies": false, "type": "", "demo": "projects\/update-auth-password-history.md", @@ -25766,7 +25782,7 @@ "x-appwrite": { "method": "updatePersonalDataCheck", "group": "auth", - "weight": 119, + "weight": 109, "cookies": false, "type": "", "demo": "projects\/update-personal-data-check.md", @@ -25845,7 +25861,7 @@ "x-appwrite": { "method": "updateSessionAlerts", "group": "auth", - "weight": 112, + "weight": 102, "cookies": false, "type": "", "demo": "projects\/update-session-alerts.md", @@ -25924,7 +25940,7 @@ "x-appwrite": { "method": "updateSessionInvalidation", "group": "auth", - "weight": 148, + "weight": 138, "cookies": false, "type": "", "demo": "projects\/update-session-invalidation.md", @@ -26003,7 +26019,7 @@ "x-appwrite": { "method": "updateAuthStatus", "group": "auth", - "weight": 116, + "weight": 106, "cookies": false, "type": "", "demo": "projects\/update-auth-status.md", @@ -26483,7 +26499,7 @@ "x-appwrite": { "method": "createJWT", "group": "auth", - "weight": 134, + "weight": 124, "cookies": false, "type": "", "demo": "projects\/create-jwt.md", @@ -26570,7 +26586,7 @@ "x-appwrite": { "method": "listKeys", "group": "keys", - "weight": 130, + "weight": 120, "cookies": false, "type": "", "demo": "projects\/list-keys.md", @@ -26639,7 +26655,7 @@ "x-appwrite": { "method": "createKey", "group": "keys", - "weight": 129, + "weight": 119, "cookies": false, "type": "", "demo": "projects\/create-key.md", @@ -26734,7 +26750,7 @@ "x-appwrite": { "method": "getKey", "group": "keys", - "weight": 131, + "weight": 121, "cookies": false, "type": "", "demo": "projects\/get-key.md", @@ -26802,7 +26818,7 @@ "x-appwrite": { "method": "updateKey", "group": "keys", - "weight": 132, + "weight": 122, "cookies": false, "type": "", "demo": "projects\/update-key.md", @@ -26898,7 +26914,7 @@ "x-appwrite": { "method": "deleteKey", "group": "keys", - "weight": 133, + "weight": 123, "cookies": false, "type": "", "demo": "projects\/delete-key.md", @@ -26968,7 +26984,7 @@ "x-appwrite": { "method": "updateOAuth2", "group": "auth", - "weight": 111, + "weight": 101, "cookies": false, "type": "", "demo": "projects\/update-o-auth-2.md", @@ -27109,7 +27125,7 @@ "x-appwrite": { "method": "listPlatforms", "group": "platforms", - "weight": 136, + "weight": 126, "cookies": false, "type": "", "demo": "projects\/list-platforms.md", @@ -27178,7 +27194,7 @@ "x-appwrite": { "method": "createPlatform", "group": "platforms", - "weight": 135, + "weight": 125, "cookies": false, "type": "", "demo": "projects\/create-platform.md", @@ -27297,7 +27313,7 @@ "x-appwrite": { "method": "getPlatform", "group": "platforms", - "weight": 137, + "weight": 127, "cookies": false, "type": "", "demo": "projects\/get-platform.md", @@ -27365,7 +27381,7 @@ "x-appwrite": { "method": "updatePlatform", "group": "platforms", - "weight": 138, + "weight": 128, "cookies": false, "type": "", "demo": "projects\/update-platform.md", @@ -27460,7 +27476,7 @@ "x-appwrite": { "method": "deletePlatform", "group": "platforms", - "weight": 139, + "weight": 129, "cookies": false, "type": "", "demo": "projects\/delete-platform.md", @@ -27530,7 +27546,7 @@ "x-appwrite": { "method": "updateServiceStatus", "group": "projects", - "weight": 107, + "weight": 97, "cookies": false, "type": "", "demo": "projects\/update-service-status.md", @@ -27632,7 +27648,7 @@ "x-appwrite": { "method": "updateServiceStatusAll", "group": "projects", - "weight": 108, + "weight": 98, "cookies": false, "type": "", "demo": "projects\/update-service-status-all.md", @@ -27711,7 +27727,7 @@ "x-appwrite": { "method": "updateSmtp", "group": "templates", - "weight": 140, + "weight": 130, "cookies": false, "type": "", "demo": "projects\/update-smtp.md", @@ -27903,7 +27919,7 @@ "x-appwrite": { "method": "createSmtpTest", "group": "templates", - "weight": 141, + "weight": 131, "cookies": false, "type": "", "demo": "projects\/create-smtp-test.md", @@ -28112,7 +28128,7 @@ "x-appwrite": { "method": "updateTeam", "group": "projects", - "weight": 106, + "weight": 96, "cookies": false, "type": "", "demo": "projects\/update-team.md", @@ -28191,7 +28207,7 @@ "x-appwrite": { "method": "getEmailTemplate", "group": "templates", - "weight": 143, + "weight": 133, "cookies": false, "type": "", "demo": "projects\/get-email-template.md", @@ -28415,7 +28431,7 @@ "x-appwrite": { "method": "updateEmailTemplate", "group": "templates", - "weight": 145, + "weight": 135, "cookies": false, "type": "", "demo": "projects\/update-email-template.md", @@ -28679,7 +28695,7 @@ "x-appwrite": { "method": "deleteEmailTemplate", "group": "templates", - "weight": 147, + "weight": 137, "cookies": false, "type": "", "demo": "projects\/delete-email-template.md", @@ -28905,7 +28921,7 @@ "x-appwrite": { "method": "getSmsTemplate", "group": "templates", - "weight": 142, + "weight": 132, "cookies": false, "type": "", "demo": "projects\/get-sms-template.md", @@ -29188,7 +29204,7 @@ "x-appwrite": { "method": "updateSmsTemplate", "group": "templates", - "weight": 144, + "weight": 134, "cookies": false, "type": "", "demo": "projects\/update-sms-template.md", @@ -29494,7 +29510,7 @@ "x-appwrite": { "method": "deleteSmsTemplate", "group": "templates", - "weight": 146, + "weight": 136, "cookies": false, "type": "", "demo": "projects\/delete-sms-template.md", @@ -29779,7 +29795,7 @@ "x-appwrite": { "method": "listWebhooks", "group": "webhooks", - "weight": 124, + "weight": 114, "cookies": false, "type": "", "demo": "projects\/list-webhooks.md", @@ -29848,7 +29864,7 @@ "x-appwrite": { "method": "createWebhook", "group": "webhooks", - "weight": 123, + "weight": 113, "cookies": false, "type": "", "demo": "projects\/create-webhook.md", @@ -29963,7 +29979,7 @@ "x-appwrite": { "method": "getWebhook", "group": "webhooks", - "weight": 125, + "weight": 115, "cookies": false, "type": "", "demo": "projects\/get-webhook.md", @@ -30031,7 +30047,7 @@ "x-appwrite": { "method": "updateWebhook", "group": "webhooks", - "weight": 126, + "weight": 116, "cookies": false, "type": "", "demo": "projects\/update-webhook.md", @@ -30147,7 +30163,7 @@ "x-appwrite": { "method": "deleteWebhook", "group": "webhooks", - "weight": 128, + "weight": 118, "cookies": false, "type": "", "demo": "projects\/delete-webhook.md", @@ -30217,7 +30233,7 @@ "x-appwrite": { "method": "updateWebhookSignature", "group": "webhooks", - "weight": 127, + "weight": 117, "cookies": false, "type": "", "demo": "projects\/update-webhook-signature.md", @@ -33456,7 +33472,7 @@ "x-appwrite": { "method": "listBuckets", "group": "buckets", - "weight": 156, + "weight": 146, "cookies": false, "type": "", "demo": "storage\/list-buckets.md", @@ -33540,7 +33556,7 @@ "x-appwrite": { "method": "createBucket", "group": "buckets", - "weight": 155, + "weight": 145, "cookies": false, "type": "", "demo": "storage\/create-bucket.md", @@ -33673,7 +33689,7 @@ "x-appwrite": { "method": "getBucket", "group": "buckets", - "weight": 157, + "weight": 147, "cookies": false, "type": "", "demo": "storage\/get-bucket.md", @@ -33732,7 +33748,7 @@ "x-appwrite": { "method": "updateBucket", "group": "buckets", - "weight": 158, + "weight": 148, "cookies": false, "type": "", "demo": "storage\/update-bucket.md", @@ -33862,7 +33878,7 @@ "x-appwrite": { "method": "deleteBucket", "group": "buckets", - "weight": 159, + "weight": 149, "cookies": false, "type": "", "demo": "storage\/delete-bucket.md", @@ -33923,7 +33939,7 @@ "x-appwrite": { "method": "listFiles", "group": "files", - "weight": 161, + "weight": 151, "cookies": false, "type": "", "demo": "storage\/list-files.md", @@ -34020,7 +34036,7 @@ "x-appwrite": { "method": "createFile", "group": "files", - "weight": 160, + "weight": 150, "cookies": false, "type": "upload", "demo": "storage\/create-file.md", @@ -34119,7 +34135,7 @@ "x-appwrite": { "method": "getFile", "group": "files", - "weight": 162, + "weight": 152, "cookies": false, "type": "", "demo": "storage\/get-file.md", @@ -34191,7 +34207,7 @@ "x-appwrite": { "method": "updateFile", "group": "files", - "weight": 167, + "weight": 157, "cookies": false, "type": "", "demo": "storage\/update-file.md", @@ -34282,7 +34298,7 @@ "x-appwrite": { "method": "deleteFile", "group": "files", - "weight": 168, + "weight": 158, "cookies": false, "type": "", "demo": "storage\/delete-file.md", @@ -34349,7 +34365,7 @@ "x-appwrite": { "method": "getFileDownload", "group": "files", - "weight": 164, + "weight": 154, "cookies": false, "type": "location", "demo": "storage\/get-file-download.md", @@ -34427,7 +34443,7 @@ "x-appwrite": { "method": "getFilePreview", "group": "files", - "weight": 163, + "weight": 153, "cookies": false, "type": "location", "demo": "storage\/get-file-preview.md", @@ -34655,7 +34671,7 @@ "x-appwrite": { "method": "getFileView", "group": "files", - "weight": 165, + "weight": 155, "cookies": false, "type": "location", "demo": "storage\/get-file-view.md", @@ -34740,7 +34756,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 169, + "weight": 159, "cookies": false, "type": "", "demo": "storage\/get-usage.md", @@ -34812,7 +34828,7 @@ "x-appwrite": { "method": "getBucketUsage", "group": null, - "weight": 170, + "weight": 160, "cookies": false, "type": "", "demo": "storage\/get-bucket-usage.md", @@ -35955,6 +35971,22 @@ "type": "boolean", "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", "x-example": false + }, + "columns": { + "type": "array", + "description": "Array of column definitions to create. Each column should contain: key (string), type (string: string, integer, float, boolean, datetime, relationship), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.", + "x-example": null, + "items": { + "type": "object" + } + }, + "indexes": { + "type": "array", + "description": "Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of column keys), orders (array of ASC\/DESC, optional), and lengths (array of integers, optional).", + "x-example": null, + "items": { + "type": "object" + } } }, "required": [ @@ -41692,7 +41724,7 @@ "x-appwrite": { "method": "list", "group": "teams", - "weight": 172, + "weight": 162, "cookies": false, "type": "", "demo": "teams\/list.md", @@ -41779,7 +41811,7 @@ "x-appwrite": { "method": "create", "group": "teams", - "weight": 171, + "weight": 161, "cookies": false, "type": "", "demo": "teams\/create.md", @@ -41864,7 +41896,7 @@ "x-appwrite": { "method": "get", "group": "teams", - "weight": 173, + "weight": 163, "cookies": false, "type": "", "demo": "teams\/get.md", @@ -41926,7 +41958,7 @@ "x-appwrite": { "method": "updateName", "group": "teams", - "weight": 175, + "weight": 165, "cookies": false, "type": "", "demo": "teams\/update-name.md", @@ -42000,7 +42032,7 @@ "x-appwrite": { "method": "delete", "group": "teams", - "weight": 177, + "weight": 167, "cookies": false, "type": "", "demo": "teams\/delete.md", @@ -42064,7 +42096,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 184, + "weight": 174, "cookies": false, "type": "", "demo": "teams\/list-logs.md", @@ -42148,7 +42180,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 179, + "weight": 169, "cookies": false, "type": "", "demo": "teams\/list-memberships.md", @@ -42245,7 +42277,7 @@ "x-appwrite": { "method": "createMembership", "group": "memberships", - "weight": 178, + "weight": 168, "cookies": false, "type": "", "demo": "teams\/create-membership.md", @@ -42356,7 +42388,7 @@ "x-appwrite": { "method": "getMembership", "group": "memberships", - "weight": 180, + "weight": 170, "cookies": false, "type": "", "demo": "teams\/get-membership.md", @@ -42428,7 +42460,7 @@ "x-appwrite": { "method": "updateMembership", "group": "memberships", - "weight": 181, + "weight": 171, "cookies": false, "type": "", "demo": "teams\/update-membership.md", @@ -42515,7 +42547,7 @@ "x-appwrite": { "method": "deleteMembership", "group": "memberships", - "weight": 183, + "weight": 173, "cookies": false, "type": "", "demo": "teams\/delete-membership.md", @@ -42589,7 +42621,7 @@ "x-appwrite": { "method": "updateMembershipStatus", "group": "memberships", - "weight": 182, + "weight": 172, "cookies": false, "type": "", "demo": "teams\/update-membership-status.md", @@ -42686,7 +42718,7 @@ "x-appwrite": { "method": "getPrefs", "group": "teams", - "weight": 174, + "weight": 164, "cookies": false, "type": "", "demo": "teams\/get-prefs.md", @@ -42746,7 +42778,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "teams", - "weight": 176, + "weight": 166, "cookies": false, "type": "", "demo": "teams\/update-prefs.md", @@ -43202,7 +43234,7 @@ "x-appwrite": { "method": "list", "group": "users", - "weight": 194, + "weight": 184, "cookies": false, "type": "", "demo": "users\/list.md", @@ -43286,7 +43318,7 @@ "x-appwrite": { "method": "create", "group": "users", - "weight": 185, + "weight": 175, "cookies": false, "type": "", "demo": "users\/create.md", @@ -43376,7 +43408,7 @@ "x-appwrite": { "method": "createArgon2User", "group": "users", - "weight": 188, + "weight": 178, "cookies": false, "type": "", "demo": "users\/create-argon-2-user.md", @@ -43461,7 +43493,7 @@ "x-appwrite": { "method": "createBcryptUser", "group": "users", - "weight": 186, + "weight": 176, "cookies": false, "type": "", "demo": "users\/create-bcrypt-user.md", @@ -43546,7 +43578,7 @@ "x-appwrite": { "method": "listIdentities", "group": "identities", - "weight": 202, + "weight": 192, "cookies": false, "type": "", "demo": "users\/list-identities.md", @@ -43625,7 +43657,7 @@ "x-appwrite": { "method": "deleteIdentity", "group": "identities", - "weight": 225, + "weight": 215, "cookies": false, "type": "", "demo": "users\/delete-identity.md", @@ -43686,7 +43718,7 @@ "x-appwrite": { "method": "createMD5User", "group": "users", - "weight": 187, + "weight": 177, "cookies": false, "type": "", "demo": "users\/create-md-5-user.md", @@ -43771,7 +43803,7 @@ "x-appwrite": { "method": "createPHPassUser", "group": "users", - "weight": 190, + "weight": 180, "cookies": false, "type": "", "demo": "users\/create-ph-pass-user.md", @@ -43856,7 +43888,7 @@ "x-appwrite": { "method": "createScryptUser", "group": "users", - "weight": 191, + "weight": 181, "cookies": false, "type": "", "demo": "users\/create-scrypt-user.md", @@ -43971,7 +44003,7 @@ "x-appwrite": { "method": "createScryptModifiedUser", "group": "users", - "weight": 192, + "weight": 182, "cookies": false, "type": "", "demo": "users\/create-scrypt-modified-user.md", @@ -44074,7 +44106,7 @@ "x-appwrite": { "method": "createSHAUser", "group": "users", - "weight": 189, + "weight": 179, "cookies": false, "type": "", "demo": "users\/create-sha-user.md", @@ -44179,7 +44211,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 227, + "weight": 217, "cookies": false, "type": "", "demo": "users\/get-usage.md", @@ -44251,7 +44283,7 @@ "x-appwrite": { "method": "get", "group": "users", - "weight": 195, + "weight": 185, "cookies": false, "type": "", "demo": "users\/get.md", @@ -44303,7 +44335,7 @@ "x-appwrite": { "method": "delete", "group": "users", - "weight": 223, + "weight": 213, "cookies": false, "type": "", "demo": "users\/delete.md", @@ -44364,7 +44396,7 @@ "x-appwrite": { "method": "updateEmail", "group": "users", - "weight": 208, + "weight": 198, "cookies": false, "type": "", "demo": "users\/update-email.md", @@ -44444,7 +44476,7 @@ "x-appwrite": { "method": "createJWT", "group": "sessions", - "weight": 226, + "weight": 216, "cookies": false, "type": "", "demo": "users\/create-jwt.md", @@ -44526,7 +44558,7 @@ "x-appwrite": { "method": "updateLabels", "group": "users", - "weight": 204, + "weight": 194, "cookies": false, "type": "", "demo": "users\/update-labels.md", @@ -44609,7 +44641,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 200, + "weight": 190, "cookies": false, "type": "", "demo": "users\/list-logs.md", @@ -44694,7 +44726,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 199, + "weight": 189, "cookies": false, "type": "", "demo": "users\/list-memberships.md", @@ -44790,7 +44822,7 @@ "x-appwrite": { "method": "updateMfa", "group": "users", - "weight": 213, + "weight": 203, "cookies": false, "type": "", "demo": "users\/update-mfa.md", @@ -44921,7 +44953,7 @@ "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", - "weight": 218, + "weight": 208, "cookies": false, "type": "", "demo": "users\/delete-mfa-authenticator.md", @@ -45053,7 +45085,7 @@ "x-appwrite": { "method": "listMfaFactors", "group": "mfa", - "weight": 214, + "weight": 204, "cookies": false, "type": "", "demo": "users\/list-mfa-factors.md", @@ -45168,7 +45200,7 @@ "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", - "weight": 215, + "weight": 205, "cookies": false, "type": "", "demo": "users\/get-mfa-recovery-codes.md", @@ -45281,7 +45313,7 @@ "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", - "weight": 217, + "weight": 207, "cookies": false, "type": "", "demo": "users\/update-mfa-recovery-codes.md", @@ -45394,7 +45426,7 @@ "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", - "weight": 216, + "weight": 206, "cookies": false, "type": "", "demo": "users\/create-mfa-recovery-codes.md", @@ -45509,7 +45541,7 @@ "x-appwrite": { "method": "updateName", "group": "users", - "weight": 206, + "weight": 196, "cookies": false, "type": "", "demo": "users\/update-name.md", @@ -45589,7 +45621,7 @@ "x-appwrite": { "method": "updatePassword", "group": "users", - "weight": 207, + "weight": 197, "cookies": false, "type": "", "demo": "users\/update-password.md", @@ -45669,7 +45701,7 @@ "x-appwrite": { "method": "updatePhone", "group": "users", - "weight": 209, + "weight": 199, "cookies": false, "type": "", "demo": "users\/update-phone.md", @@ -45749,7 +45781,7 @@ "x-appwrite": { "method": "getPrefs", "group": "users", - "weight": 196, + "weight": 186, "cookies": false, "type": "", "demo": "users\/get-prefs.md", @@ -45808,7 +45840,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "users", - "weight": 211, + "weight": 201, "cookies": false, "type": "", "demo": "users\/update-prefs.md", @@ -45888,7 +45920,7 @@ "x-appwrite": { "method": "listSessions", "group": "sessions", - "weight": 198, + "weight": 188, "cookies": false, "type": "", "demo": "users\/list-sessions.md", @@ -45958,7 +45990,7 @@ "x-appwrite": { "method": "createSession", "group": "sessions", - "weight": 219, + "weight": 209, "cookies": false, "type": "", "demo": "users\/create-session.md", @@ -46010,7 +46042,7 @@ "x-appwrite": { "method": "deleteSessions", "group": "sessions", - "weight": 222, + "weight": 212, "cookies": false, "type": "", "demo": "users\/delete-sessions.md", @@ -46064,7 +46096,7 @@ "x-appwrite": { "method": "deleteSession", "group": "sessions", - "weight": 221, + "weight": 211, "cookies": false, "type": "", "demo": "users\/delete-session.md", @@ -46135,7 +46167,7 @@ "x-appwrite": { "method": "updateStatus", "group": "users", - "weight": 203, + "weight": 193, "cookies": false, "type": "", "demo": "users\/update-status.md", @@ -46215,7 +46247,7 @@ "x-appwrite": { "method": "listTargets", "group": "targets", - "weight": 201, + "weight": 191, "cookies": false, "type": "", "demo": "users\/list-targets.md", @@ -46299,7 +46331,7 @@ "x-appwrite": { "method": "createTarget", "group": "targets", - "weight": 193, + "weight": 183, "cookies": false, "type": "", "demo": "users\/create-target.md", @@ -46409,7 +46441,7 @@ "x-appwrite": { "method": "getTarget", "group": "targets", - "weight": 197, + "weight": 187, "cookies": false, "type": "", "demo": "users\/get-target.md", @@ -46479,7 +46511,7 @@ "x-appwrite": { "method": "updateTarget", "group": "targets", - "weight": 212, + "weight": 202, "cookies": false, "type": "", "demo": "users\/update-target.md", @@ -46568,7 +46600,7 @@ "x-appwrite": { "method": "deleteTarget", "group": "targets", - "weight": 224, + "weight": 214, "cookies": false, "type": "", "demo": "users\/delete-target.md", @@ -46640,7 +46672,7 @@ "x-appwrite": { "method": "createToken", "group": "sessions", - "weight": 220, + "weight": 210, "cookies": false, "type": "", "demo": "users\/create-token.md", @@ -46722,7 +46754,7 @@ "x-appwrite": { "method": "updateEmailVerification", "group": "users", - "weight": 210, + "weight": 200, "cookies": false, "type": "", "demo": "users\/update-email-verification.md", @@ -46802,7 +46834,7 @@ "x-appwrite": { "method": "updatePhoneVerification", "group": "users", - "weight": 205, + "weight": 195, "cookies": false, "type": "", "demo": "users\/update-phone-verification.md", @@ -46882,7 +46914,7 @@ "x-appwrite": { "method": "createRepositoryDetection", "group": "repositories", - "weight": 231, + "weight": 221, "cookies": false, "type": "", "demo": "vcs\/create-repository-detection.md", @@ -46978,7 +47010,7 @@ "x-appwrite": { "method": "listRepositories", "group": "repositories", - "weight": 232, + "weight": 222, "cookies": false, "type": "", "demo": "vcs\/list-repositories.md", @@ -47037,6 +47069,19 @@ "default": "" }, "in": "query" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" } ] }, @@ -47063,7 +47108,7 @@ "x-appwrite": { "method": "createRepository", "group": "repositories", - "weight": 233, + "weight": 223, "cookies": false, "type": "", "demo": "vcs\/create-repository.md", @@ -47148,7 +47193,7 @@ "x-appwrite": { "method": "getRepository", "group": "repositories", - "weight": 234, + "weight": 224, "cookies": false, "type": "", "demo": "vcs\/get-repository.md", @@ -47218,7 +47263,7 @@ "x-appwrite": { "method": "listRepositoryBranches", "group": "repositories", - "weight": 235, + "weight": 225, "cookies": false, "type": "", "demo": "vcs\/list-repository-branches.md", @@ -47288,7 +47333,7 @@ "x-appwrite": { "method": "getRepositoryContents", "group": "repositories", - "weight": 230, + "weight": 220, "cookies": false, "type": "", "demo": "vcs\/get-repository-contents.md", @@ -47373,7 +47418,7 @@ "x-appwrite": { "method": "updateExternalDeployments", "group": "repositories", - "weight": 240, + "weight": 230, "cookies": false, "type": "", "demo": "vcs\/update-external-deployments.md", @@ -47462,7 +47507,7 @@ "x-appwrite": { "method": "listInstallations", "group": "installations", - "weight": 237, + "weight": 227, "cookies": false, "type": "", "demo": "vcs\/list-installations.md", @@ -47547,7 +47592,7 @@ "x-appwrite": { "method": "getInstallation", "group": "installations", - "weight": 238, + "weight": 228, "cookies": false, "type": "", "demo": "vcs\/get-installation.md", @@ -47598,7 +47643,7 @@ "x-appwrite": { "method": "deleteInstallation", "group": "installations", - "weight": 239, + "weight": 229, "cookies": false, "type": "", "demo": "vcs\/delete-installation.md", diff --git a/app/config/specs/open-api3-1.8.x-server.json b/app/config/specs/open-api3-1.8.x-server.json index a2a97c046e..3a87dc33de 100644 --- a/app/config/specs/open-api3-1.8.x-server.json +++ b/app/config/specs/open-api3-1.8.x-server.json @@ -260,7 +260,7 @@ "x-appwrite": { "method": "listIdentities", "group": "identities", - "weight": 58, + "weight": 48, "cookies": false, "type": "", "demo": "account\/list-identities.md", @@ -331,7 +331,7 @@ "x-appwrite": { "method": "deleteIdentity", "group": "identities", - "weight": 59, + "weight": 49, "cookies": false, "type": "", "demo": "account\/delete-identity.md", @@ -522,7 +522,7 @@ "x-appwrite": { "method": "updateMFA", "group": "mfa", - "weight": 45, + "weight": 306, "cookies": false, "type": "", "demo": "account\/update-mfa.md", @@ -593,7 +593,7 @@ "x-appwrite": { "method": "createMfaAuthenticator", "group": "mfa", - "weight": 47, + "weight": 308, "cookies": false, "type": "", "demo": "account\/create-mfa-authenticator.md", @@ -716,7 +716,7 @@ "x-appwrite": { "method": "updateMfaAuthenticator", "group": "mfa", - "weight": 48, + "weight": 309, "cookies": false, "type": "", "demo": "account\/update-mfa-authenticator.md", @@ -855,7 +855,7 @@ "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", - "weight": 52, + "weight": 310, "cookies": false, "type": "", "demo": "account\/delete-mfa-authenticator.md", @@ -954,7 +954,7 @@ ] } }, - "\/account\/mfa\/challenge": { + "\/account\/mfa\/challenges": { "post": { "summary": "Create MFA challenge", "operationId": "accountCreateMfaChallenge", @@ -978,7 +978,7 @@ "x-appwrite": { "method": "createMfaChallenge", "group": "mfa", - "weight": 53, + "weight": 314, "cookies": false, "type": "", "demo": "account\/create-mfa-challenge.md", @@ -1106,7 +1106,7 @@ "x-appwrite": { "method": "updateMfaChallenge", "group": "mfa", - "weight": 54, + "weight": 315, "cookies": false, "type": "", "demo": "account\/update-mfa-challenge.md", @@ -1243,7 +1243,7 @@ "x-appwrite": { "method": "listMfaFactors", "group": "mfa", - "weight": 46, + "weight": 307, "cookies": false, "type": "", "demo": "account\/list-mfa-factors.md", @@ -1343,7 +1343,7 @@ "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", - "weight": 51, + "weight": 313, "cookies": false, "type": "", "demo": "account\/get-mfa-recovery-codes.md", @@ -1441,7 +1441,7 @@ "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", - "weight": 49, + "weight": 311, "cookies": false, "type": "", "demo": "account\/create-mfa-recovery-codes.md", @@ -1539,7 +1539,7 @@ "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", - "weight": 50, + "weight": 312, "cookies": false, "type": "", "demo": "account\/update-mfa-recovery-codes.md", @@ -3584,7 +3584,7 @@ "x-appwrite": { "method": "getBrowser", "group": null, - "weight": 61, + "weight": 51, "cookies": false, "type": "location", "demo": "avatars\/get-browser.md", @@ -3712,7 +3712,7 @@ "x-appwrite": { "method": "getCreditCard", "group": null, - "weight": 60, + "weight": 50, "cookies": false, "type": "location", "demo": "avatars\/get-credit-card.md", @@ -3846,7 +3846,7 @@ "x-appwrite": { "method": "getFavicon", "group": null, - "weight": 64, + "weight": 54, "cookies": false, "type": "location", "demo": "avatars\/get-favicon.md", @@ -3906,7 +3906,7 @@ "x-appwrite": { "method": "getFlag", "group": null, - "weight": 62, + "weight": 52, "cookies": false, "type": "location", "demo": "avatars\/get-flag.md", @@ -4396,7 +4396,7 @@ "x-appwrite": { "method": "getImage", "group": null, - "weight": 63, + "weight": 53, "cookies": false, "type": "location", "demo": "avatars\/get-image.md", @@ -4480,7 +4480,7 @@ "x-appwrite": { "method": "getInitials", "group": null, - "weight": 66, + "weight": 56, "cookies": false, "type": "location", "demo": "avatars\/get-initials.md", @@ -4574,7 +4574,7 @@ "x-appwrite": { "method": "getQR", "group": null, - "weight": 65, + "weight": 55, "cookies": false, "type": "location", "demo": "avatars\/get-qr.md", @@ -4668,7 +4668,7 @@ "x-appwrite": { "method": "getScreenshot", "group": null, - "weight": 67, + "weight": 57, "cookies": false, "type": "location", "demo": "avatars\/get-screenshot.md", @@ -6533,6 +6533,22 @@ "type": "boolean", "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", "x-example": false + }, + "attributes": { + "type": "array", + "description": "Array of attribute definitions to create. Each attribute should contain: key (string), type (string: string, integer, float, boolean, datetime, relationship), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.", + "x-example": null, + "items": { + "type": "object" + } + }, + "indexes": { + "type": "array", + "description": "Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of attribute keys), orders (array of ASC\/DESC, optional), and lengths (array of integers, optional).", + "x-example": null, + "items": { + "type": "object" + } } }, "required": [ @@ -14387,7 +14403,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 251, + "weight": 241, "cookies": false, "type": "graphql", "demo": "graphql\/query.md", @@ -14441,7 +14457,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 250, + "weight": 240, "cookies": false, "type": "graphql", "demo": "graphql\/mutation.md", @@ -14495,7 +14511,7 @@ "x-appwrite": { "method": "get", "group": "health", - "weight": 79, + "weight": 69, "cookies": false, "type": "", "demo": "health\/get.md", @@ -14545,7 +14561,7 @@ "x-appwrite": { "method": "getAntivirus", "group": "health", - "weight": 100, + "weight": 90, "cookies": false, "type": "", "demo": "health\/get-antivirus.md", @@ -14595,7 +14611,7 @@ "x-appwrite": { "method": "getCache", "group": "health", - "weight": 82, + "weight": 72, "cookies": false, "type": "", "demo": "health\/get-cache.md", @@ -14645,7 +14661,7 @@ "x-appwrite": { "method": "getCertificate", "group": "health", - "weight": 87, + "weight": 77, "cookies": false, "type": "", "demo": "health\/get-certificate.md", @@ -14706,7 +14722,7 @@ "x-appwrite": { "method": "getDB", "group": "health", - "weight": 81, + "weight": 71, "cookies": false, "type": "", "demo": "health\/get-db.md", @@ -14756,7 +14772,7 @@ "x-appwrite": { "method": "getPubSub", "group": "health", - "weight": 83, + "weight": 73, "cookies": false, "type": "", "demo": "health\/get-pub-sub.md", @@ -14806,7 +14822,7 @@ "x-appwrite": { "method": "getQueueBuilds", "group": "queue", - "weight": 89, + "weight": 79, "cookies": false, "type": "", "demo": "health\/get-queue-builds.md", @@ -14869,7 +14885,7 @@ "x-appwrite": { "method": "getQueueCertificates", "group": "queue", - "weight": 88, + "weight": 78, "cookies": false, "type": "", "demo": "health\/get-queue-certificates.md", @@ -14932,7 +14948,7 @@ "x-appwrite": { "method": "getQueueDatabases", "group": "queue", - "weight": 90, + "weight": 80, "cookies": false, "type": "", "demo": "health\/get-queue-databases.md", @@ -15006,7 +15022,7 @@ "x-appwrite": { "method": "getQueueDeletes", "group": "queue", - "weight": 91, + "weight": 81, "cookies": false, "type": "", "demo": "health\/get-queue-deletes.md", @@ -15069,7 +15085,7 @@ "x-appwrite": { "method": "getFailedJobs", "group": "queue", - "weight": 101, + "weight": 91, "cookies": false, "type": "", "demo": "health\/get-failed-jobs.md", @@ -15158,7 +15174,7 @@ "x-appwrite": { "method": "getQueueFunctions", "group": "queue", - "weight": 95, + "weight": 85, "cookies": false, "type": "", "demo": "health\/get-queue-functions.md", @@ -15221,7 +15237,7 @@ "x-appwrite": { "method": "getQueueLogs", "group": "queue", - "weight": 86, + "weight": 76, "cookies": false, "type": "", "demo": "health\/get-queue-logs.md", @@ -15284,7 +15300,7 @@ "x-appwrite": { "method": "getQueueMails", "group": "queue", - "weight": 92, + "weight": 82, "cookies": false, "type": "", "demo": "health\/get-queue-mails.md", @@ -15347,7 +15363,7 @@ "x-appwrite": { "method": "getQueueMessaging", "group": "queue", - "weight": 93, + "weight": 83, "cookies": false, "type": "", "demo": "health\/get-queue-messaging.md", @@ -15410,7 +15426,7 @@ "x-appwrite": { "method": "getQueueMigrations", "group": "queue", - "weight": 94, + "weight": 84, "cookies": false, "type": "", "demo": "health\/get-queue-migrations.md", @@ -15473,7 +15489,7 @@ "x-appwrite": { "method": "getQueueStatsResources", "group": "queue", - "weight": 96, + "weight": 86, "cookies": false, "type": "", "demo": "health\/get-queue-stats-resources.md", @@ -15536,7 +15552,7 @@ "x-appwrite": { "method": "getQueueUsage", "group": "queue", - "weight": 97, + "weight": 87, "cookies": false, "type": "", "demo": "health\/get-queue-usage.md", @@ -15599,7 +15615,7 @@ "x-appwrite": { "method": "getQueueWebhooks", "group": "queue", - "weight": 85, + "weight": 75, "cookies": false, "type": "", "demo": "health\/get-queue-webhooks.md", @@ -15662,7 +15678,7 @@ "x-appwrite": { "method": "getStorage", "group": "storage", - "weight": 99, + "weight": 89, "cookies": false, "type": "", "demo": "health\/get-storage.md", @@ -15712,7 +15728,7 @@ "x-appwrite": { "method": "getStorageLocal", "group": "storage", - "weight": 98, + "weight": 88, "cookies": false, "type": "", "demo": "health\/get-storage-local.md", @@ -15762,7 +15778,7 @@ "x-appwrite": { "method": "getTime", "group": "health", - "weight": 84, + "weight": 74, "cookies": false, "type": "", "demo": "health\/get-time.md", @@ -15812,7 +15828,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 71, + "weight": 61, "cookies": false, "type": "", "demo": "locale\/get.md", @@ -15866,7 +15882,7 @@ "x-appwrite": { "method": "listCodes", "group": null, - "weight": 72, + "weight": 62, "cookies": false, "type": "", "demo": "locale\/list-codes.md", @@ -15920,7 +15936,7 @@ "x-appwrite": { "method": "listContinents", "group": null, - "weight": 76, + "weight": 66, "cookies": false, "type": "", "demo": "locale\/list-continents.md", @@ -15974,7 +15990,7 @@ "x-appwrite": { "method": "listCountries", "group": null, - "weight": 73, + "weight": 63, "cookies": false, "type": "", "demo": "locale\/list-countries.md", @@ -16028,7 +16044,7 @@ "x-appwrite": { "method": "listCountriesEU", "group": null, - "weight": 74, + "weight": 64, "cookies": false, "type": "", "demo": "locale\/list-countries-eu.md", @@ -16082,7 +16098,7 @@ "x-appwrite": { "method": "listCountriesPhones", "group": null, - "weight": 75, + "weight": 65, "cookies": false, "type": "", "demo": "locale\/list-countries-phones.md", @@ -16136,7 +16152,7 @@ "x-appwrite": { "method": "listCurrencies", "group": null, - "weight": 77, + "weight": 67, "cookies": false, "type": "", "demo": "locale\/list-currencies.md", @@ -16190,7 +16206,7 @@ "x-appwrite": { "method": "listLanguages", "group": null, - "weight": 78, + "weight": 68, "cookies": false, "type": "", "demo": "locale\/list-languages.md", @@ -16244,7 +16260,7 @@ "x-appwrite": { "method": "listMessages", "group": "messages", - "weight": 308, + "weight": 298, "cookies": false, "type": "", "demo": "messaging\/list-messages.md", @@ -16332,7 +16348,7 @@ "x-appwrite": { "method": "createEmail", "group": "messages", - "weight": 305, + "weight": 295, "cookies": false, "type": "", "demo": "messaging\/create-email.md", @@ -16478,7 +16494,7 @@ "x-appwrite": { "method": "updateEmail", "group": "messages", - "weight": 312, + "weight": 302, "cookies": false, "type": "", "demo": "messaging\/update-email.md", @@ -16636,7 +16652,7 @@ "x-appwrite": { "method": "createPush", "group": "messages", - "weight": 307, + "weight": 297, "cookies": false, "type": "", "demo": "messaging\/create-push.md", @@ -16813,7 +16829,7 @@ "x-appwrite": { "method": "updatePush", "group": "messages", - "weight": 314, + "weight": 304, "cookies": false, "type": "", "demo": "messaging\/update-push.md", @@ -17010,7 +17026,7 @@ "x-appwrite": { "method": "createSms", "group": "messages", - "weight": 306, + "weight": 296, "cookies": false, "type": "", "demo": "messaging\/create-sms.md", @@ -17191,7 +17207,7 @@ "x-appwrite": { "method": "updateSms", "group": "messages", - "weight": 313, + "weight": 303, "cookies": false, "type": "", "demo": "messaging\/update-sms.md", @@ -17378,7 +17394,7 @@ "x-appwrite": { "method": "getMessage", "group": "messages", - "weight": 311, + "weight": 301, "cookies": false, "type": "", "demo": "messaging\/get-message.md", @@ -17432,7 +17448,7 @@ "x-appwrite": { "method": "delete", "group": "messages", - "weight": 315, + "weight": 305, "cookies": false, "type": "", "demo": "messaging\/delete.md", @@ -17495,7 +17511,7 @@ "x-appwrite": { "method": "listMessageLogs", "group": "logs", - "weight": 309, + "weight": 299, "cookies": false, "type": "", "demo": "messaging\/list-message-logs.md", @@ -17582,7 +17598,7 @@ "x-appwrite": { "method": "listTargets", "group": "messages", - "weight": 310, + "weight": 300, "cookies": false, "type": "", "demo": "messaging\/list-targets.md", @@ -17669,7 +17685,7 @@ "x-appwrite": { "method": "listProviders", "group": "providers", - "weight": 279, + "weight": 269, "cookies": false, "type": "", "demo": "messaging\/list-providers.md", @@ -17757,7 +17773,7 @@ "x-appwrite": { "method": "createApnsProvider", "group": "providers", - "weight": 278, + "weight": 268, "cookies": false, "type": "", "demo": "messaging\/create-apns-provider.md", @@ -17936,7 +17952,7 @@ "x-appwrite": { "method": "updateApnsProvider", "group": "providers", - "weight": 292, + "weight": 282, "cookies": false, "type": "", "demo": "messaging\/update-apns-provider.md", @@ -18117,7 +18133,7 @@ "x-appwrite": { "method": "createFcmProvider", "group": "providers", - "weight": 277, + "weight": 267, "cookies": false, "type": "", "demo": "messaging\/create-fcm-provider.md", @@ -18269,7 +18285,7 @@ "x-appwrite": { "method": "updateFcmProvider", "group": "providers", - "weight": 291, + "weight": 281, "cookies": false, "type": "", "demo": "messaging\/update-fcm-provider.md", @@ -18422,7 +18438,7 @@ "x-appwrite": { "method": "createMailgunProvider", "group": "providers", - "weight": 268, + "weight": 258, "cookies": false, "type": "", "demo": "messaging\/create-mailgun-provider.md", @@ -18540,7 +18556,7 @@ "x-appwrite": { "method": "updateMailgunProvider", "group": "providers", - "weight": 282, + "weight": 272, "cookies": false, "type": "", "demo": "messaging\/update-mailgun-provider.md", @@ -18661,7 +18677,7 @@ "x-appwrite": { "method": "createMsg91Provider", "group": "providers", - "weight": 272, + "weight": 262, "cookies": false, "type": "", "demo": "messaging\/create-msg-91-provider.md", @@ -18758,7 +18774,7 @@ "x-appwrite": { "method": "updateMsg91Provider", "group": "providers", - "weight": 286, + "weight": 276, "cookies": false, "type": "", "demo": "messaging\/update-msg-91-provider.md", @@ -18858,7 +18874,7 @@ "x-appwrite": { "method": "createResendProvider", "group": "providers", - "weight": 270, + "weight": 260, "cookies": false, "type": "", "demo": "messaging\/create-resend-provider.md", @@ -18965,7 +18981,7 @@ "x-appwrite": { "method": "updateResendProvider", "group": "providers", - "weight": 284, + "weight": 274, "cookies": false, "type": "", "demo": "messaging\/update-resend-provider.md", @@ -19075,7 +19091,7 @@ "x-appwrite": { "method": "createSendgridProvider", "group": "providers", - "weight": 269, + "weight": 259, "cookies": false, "type": "", "demo": "messaging\/create-sendgrid-provider.md", @@ -19182,7 +19198,7 @@ "x-appwrite": { "method": "updateSendgridProvider", "group": "providers", - "weight": 283, + "weight": 273, "cookies": false, "type": "", "demo": "messaging\/update-sendgrid-provider.md", @@ -19292,7 +19308,7 @@ "x-appwrite": { "method": "createSmtpProvider", "group": "providers", - "weight": 271, + "weight": 261, "cookies": false, "type": "", "demo": "messaging\/create-smtp-provider.md", @@ -19523,7 +19539,7 @@ "x-appwrite": { "method": "updateSmtpProvider", "group": "providers", - "weight": 285, + "weight": 275, "cookies": false, "type": "", "demo": "messaging\/update-smtp-provider.md", @@ -19754,7 +19770,7 @@ "x-appwrite": { "method": "createTelesignProvider", "group": "providers", - "weight": 273, + "weight": 263, "cookies": false, "type": "", "demo": "messaging\/create-telesign-provider.md", @@ -19851,7 +19867,7 @@ "x-appwrite": { "method": "updateTelesignProvider", "group": "providers", - "weight": 287, + "weight": 277, "cookies": false, "type": "", "demo": "messaging\/update-telesign-provider.md", @@ -19951,7 +19967,7 @@ "x-appwrite": { "method": "createTextmagicProvider", "group": "providers", - "weight": 274, + "weight": 264, "cookies": false, "type": "", "demo": "messaging\/create-textmagic-provider.md", @@ -20048,7 +20064,7 @@ "x-appwrite": { "method": "updateTextmagicProvider", "group": "providers", - "weight": 288, + "weight": 278, "cookies": false, "type": "", "demo": "messaging\/update-textmagic-provider.md", @@ -20148,7 +20164,7 @@ "x-appwrite": { "method": "createTwilioProvider", "group": "providers", - "weight": 275, + "weight": 265, "cookies": false, "type": "", "demo": "messaging\/create-twilio-provider.md", @@ -20245,7 +20261,7 @@ "x-appwrite": { "method": "updateTwilioProvider", "group": "providers", - "weight": 289, + "weight": 279, "cookies": false, "type": "", "demo": "messaging\/update-twilio-provider.md", @@ -20345,7 +20361,7 @@ "x-appwrite": { "method": "createVonageProvider", "group": "providers", - "weight": 276, + "weight": 266, "cookies": false, "type": "", "demo": "messaging\/create-vonage-provider.md", @@ -20442,7 +20458,7 @@ "x-appwrite": { "method": "updateVonageProvider", "group": "providers", - "weight": 290, + "weight": 280, "cookies": false, "type": "", "demo": "messaging\/update-vonage-provider.md", @@ -20542,7 +20558,7 @@ "x-appwrite": { "method": "getProvider", "group": "providers", - "weight": 281, + "weight": 271, "cookies": false, "type": "", "demo": "messaging\/get-provider.md", @@ -20596,7 +20612,7 @@ "x-appwrite": { "method": "deleteProvider", "group": "providers", - "weight": 293, + "weight": 283, "cookies": false, "type": "", "demo": "messaging\/delete-provider.md", @@ -20659,7 +20675,7 @@ "x-appwrite": { "method": "listProviderLogs", "group": "providers", - "weight": 280, + "weight": 270, "cookies": false, "type": "", "demo": "messaging\/list-provider-logs.md", @@ -20746,7 +20762,7 @@ "x-appwrite": { "method": "listSubscriberLogs", "group": "subscribers", - "weight": 302, + "weight": 292, "cookies": false, "type": "", "demo": "messaging\/list-subscriber-logs.md", @@ -20833,7 +20849,7 @@ "x-appwrite": { "method": "listTopics", "group": "topics", - "weight": 295, + "weight": 285, "cookies": false, "type": "", "demo": "messaging\/list-topics.md", @@ -20919,7 +20935,7 @@ "x-appwrite": { "method": "createTopic", "group": "topics", - "weight": 294, + "weight": 284, "cookies": false, "type": "", "demo": "messaging\/create-topic.md", @@ -21003,7 +21019,7 @@ "x-appwrite": { "method": "getTopic", "group": "topics", - "weight": 297, + "weight": 287, "cookies": false, "type": "", "demo": "messaging\/get-topic.md", @@ -21064,7 +21080,7 @@ "x-appwrite": { "method": "updateTopic", "group": "topics", - "weight": 298, + "weight": 288, "cookies": false, "type": "", "demo": "messaging\/update-topic.md", @@ -21144,7 +21160,7 @@ "x-appwrite": { "method": "deleteTopic", "group": "topics", - "weight": 299, + "weight": 289, "cookies": false, "type": "", "demo": "messaging\/delete-topic.md", @@ -21207,7 +21223,7 @@ "x-appwrite": { "method": "listTopicLogs", "group": "topics", - "weight": 296, + "weight": 286, "cookies": false, "type": "", "demo": "messaging\/list-topic-logs.md", @@ -21294,7 +21310,7 @@ "x-appwrite": { "method": "listSubscribers", "group": "subscribers", - "weight": 301, + "weight": 291, "cookies": false, "type": "", "demo": "messaging\/list-subscribers.md", @@ -21390,7 +21406,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 300, + "weight": 290, "cookies": false, "type": "", "demo": "messaging\/create-subscriber.md", @@ -21482,7 +21498,7 @@ "x-appwrite": { "method": "getSubscriber", "group": "subscribers", - "weight": 303, + "weight": 293, "cookies": false, "type": "", "demo": "messaging\/get-subscriber.md", @@ -21546,7 +21562,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 304, + "weight": 294, "cookies": false, "type": "", "demo": "messaging\/delete-subscriber.md", @@ -23911,7 +23927,7 @@ "x-appwrite": { "method": "listBuckets", "group": "buckets", - "weight": 156, + "weight": 146, "cookies": false, "type": "", "demo": "storage\/list-buckets.md", @@ -23996,7 +24012,7 @@ "x-appwrite": { "method": "createBucket", "group": "buckets", - "weight": 155, + "weight": 145, "cookies": false, "type": "", "demo": "storage\/create-bucket.md", @@ -24130,7 +24146,7 @@ "x-appwrite": { "method": "getBucket", "group": "buckets", - "weight": 157, + "weight": 147, "cookies": false, "type": "", "demo": "storage\/get-bucket.md", @@ -24190,7 +24206,7 @@ "x-appwrite": { "method": "updateBucket", "group": "buckets", - "weight": 158, + "weight": 148, "cookies": false, "type": "", "demo": "storage\/update-bucket.md", @@ -24321,7 +24337,7 @@ "x-appwrite": { "method": "deleteBucket", "group": "buckets", - "weight": 159, + "weight": 149, "cookies": false, "type": "", "demo": "storage\/delete-bucket.md", @@ -24383,7 +24399,7 @@ "x-appwrite": { "method": "listFiles", "group": "files", - "weight": 161, + "weight": 151, "cookies": false, "type": "", "demo": "storage\/list-files.md", @@ -24482,7 +24498,7 @@ "x-appwrite": { "method": "createFile", "group": "files", - "weight": 160, + "weight": 150, "cookies": false, "type": "upload", "demo": "storage\/create-file.md", @@ -24583,7 +24599,7 @@ "x-appwrite": { "method": "getFile", "group": "files", - "weight": 162, + "weight": 152, "cookies": false, "type": "", "demo": "storage\/get-file.md", @@ -24657,7 +24673,7 @@ "x-appwrite": { "method": "updateFile", "group": "files", - "weight": 167, + "weight": 157, "cookies": false, "type": "", "demo": "storage\/update-file.md", @@ -24750,7 +24766,7 @@ "x-appwrite": { "method": "deleteFile", "group": "files", - "weight": 168, + "weight": 158, "cookies": false, "type": "", "demo": "storage\/delete-file.md", @@ -24819,7 +24835,7 @@ "x-appwrite": { "method": "getFileDownload", "group": "files", - "weight": 164, + "weight": 154, "cookies": false, "type": "location", "demo": "storage\/get-file-download.md", @@ -24899,7 +24915,7 @@ "x-appwrite": { "method": "getFilePreview", "group": "files", - "weight": 163, + "weight": 153, "cookies": false, "type": "location", "demo": "storage\/get-file-preview.md", @@ -25129,7 +25145,7 @@ "x-appwrite": { "method": "getFileView", "group": "files", - "weight": 165, + "weight": 155, "cookies": false, "type": "location", "demo": "storage\/get-file-view.md", @@ -26199,6 +26215,22 @@ "type": "boolean", "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", "x-example": false + }, + "columns": { + "type": "array", + "description": "Array of column definitions to create. Each column should contain: key (string), type (string: string, integer, float, boolean, datetime, relationship), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.", + "x-example": null, + "items": { + "type": "object" + } + }, + "indexes": { + "type": "array", + "description": "Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of column keys), orders (array of ASC\/DESC, optional), and lengths (array of integers, optional).", + "x-example": null, + "items": { + "type": "object" + } } }, "required": [ @@ -31608,7 +31640,7 @@ "x-appwrite": { "method": "list", "group": "teams", - "weight": 172, + "weight": 162, "cookies": false, "type": "", "demo": "teams\/list.md", @@ -31697,7 +31729,7 @@ "x-appwrite": { "method": "create", "group": "teams", - "weight": 171, + "weight": 161, "cookies": false, "type": "", "demo": "teams\/create.md", @@ -31784,7 +31816,7 @@ "x-appwrite": { "method": "get", "group": "teams", - "weight": 173, + "weight": 163, "cookies": false, "type": "", "demo": "teams\/get.md", @@ -31848,7 +31880,7 @@ "x-appwrite": { "method": "updateName", "group": "teams", - "weight": 175, + "weight": 165, "cookies": false, "type": "", "demo": "teams\/update-name.md", @@ -31924,7 +31956,7 @@ "x-appwrite": { "method": "delete", "group": "teams", - "weight": 177, + "weight": 167, "cookies": false, "type": "", "demo": "teams\/delete.md", @@ -31990,7 +32022,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 179, + "weight": 169, "cookies": false, "type": "", "demo": "teams\/list-memberships.md", @@ -32089,7 +32121,7 @@ "x-appwrite": { "method": "createMembership", "group": "memberships", - "weight": 178, + "weight": 168, "cookies": false, "type": "", "demo": "teams\/create-membership.md", @@ -32202,7 +32234,7 @@ "x-appwrite": { "method": "getMembership", "group": "memberships", - "weight": 180, + "weight": 170, "cookies": false, "type": "", "demo": "teams\/get-membership.md", @@ -32276,7 +32308,7 @@ "x-appwrite": { "method": "updateMembership", "group": "memberships", - "weight": 181, + "weight": 171, "cookies": false, "type": "", "demo": "teams\/update-membership.md", @@ -32365,7 +32397,7 @@ "x-appwrite": { "method": "deleteMembership", "group": "memberships", - "weight": 183, + "weight": 173, "cookies": false, "type": "", "demo": "teams\/delete-membership.md", @@ -32441,7 +32473,7 @@ "x-appwrite": { "method": "updateMembershipStatus", "group": "memberships", - "weight": 182, + "weight": 172, "cookies": false, "type": "", "demo": "teams\/update-membership-status.md", @@ -32540,7 +32572,7 @@ "x-appwrite": { "method": "getPrefs", "group": "teams", - "weight": 174, + "weight": 164, "cookies": false, "type": "", "demo": "teams\/get-prefs.md", @@ -32602,7 +32634,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "teams", - "weight": 176, + "weight": 166, "cookies": false, "type": "", "demo": "teams\/update-prefs.md", @@ -33065,7 +33097,7 @@ "x-appwrite": { "method": "list", "group": "users", - "weight": 194, + "weight": 184, "cookies": false, "type": "", "demo": "users\/list.md", @@ -33150,7 +33182,7 @@ "x-appwrite": { "method": "create", "group": "users", - "weight": 185, + "weight": 175, "cookies": false, "type": "", "demo": "users\/create.md", @@ -33241,7 +33273,7 @@ "x-appwrite": { "method": "createArgon2User", "group": "users", - "weight": 188, + "weight": 178, "cookies": false, "type": "", "demo": "users\/create-argon-2-user.md", @@ -33327,7 +33359,7 @@ "x-appwrite": { "method": "createBcryptUser", "group": "users", - "weight": 186, + "weight": 176, "cookies": false, "type": "", "demo": "users\/create-bcrypt-user.md", @@ -33413,7 +33445,7 @@ "x-appwrite": { "method": "listIdentities", "group": "identities", - "weight": 202, + "weight": 192, "cookies": false, "type": "", "demo": "users\/list-identities.md", @@ -33493,7 +33525,7 @@ "x-appwrite": { "method": "deleteIdentity", "group": "identities", - "weight": 225, + "weight": 215, "cookies": false, "type": "", "demo": "users\/delete-identity.md", @@ -33555,7 +33587,7 @@ "x-appwrite": { "method": "createMD5User", "group": "users", - "weight": 187, + "weight": 177, "cookies": false, "type": "", "demo": "users\/create-md-5-user.md", @@ -33641,7 +33673,7 @@ "x-appwrite": { "method": "createPHPassUser", "group": "users", - "weight": 190, + "weight": 180, "cookies": false, "type": "", "demo": "users\/create-ph-pass-user.md", @@ -33727,7 +33759,7 @@ "x-appwrite": { "method": "createScryptUser", "group": "users", - "weight": 191, + "weight": 181, "cookies": false, "type": "", "demo": "users\/create-scrypt-user.md", @@ -33843,7 +33875,7 @@ "x-appwrite": { "method": "createScryptModifiedUser", "group": "users", - "weight": 192, + "weight": 182, "cookies": false, "type": "", "demo": "users\/create-scrypt-modified-user.md", @@ -33947,7 +33979,7 @@ "x-appwrite": { "method": "createSHAUser", "group": "users", - "weight": 189, + "weight": 179, "cookies": false, "type": "", "demo": "users\/create-sha-user.md", @@ -34053,7 +34085,7 @@ "x-appwrite": { "method": "get", "group": "users", - "weight": 195, + "weight": 185, "cookies": false, "type": "", "demo": "users\/get.md", @@ -34106,7 +34138,7 @@ "x-appwrite": { "method": "delete", "group": "users", - "weight": 223, + "weight": 213, "cookies": false, "type": "", "demo": "users\/delete.md", @@ -34168,7 +34200,7 @@ "x-appwrite": { "method": "updateEmail", "group": "users", - "weight": 208, + "weight": 198, "cookies": false, "type": "", "demo": "users\/update-email.md", @@ -34249,7 +34281,7 @@ "x-appwrite": { "method": "createJWT", "group": "sessions", - "weight": 226, + "weight": 216, "cookies": false, "type": "", "demo": "users\/create-jwt.md", @@ -34332,7 +34364,7 @@ "x-appwrite": { "method": "updateLabels", "group": "users", - "weight": 204, + "weight": 194, "cookies": false, "type": "", "demo": "users\/update-labels.md", @@ -34416,7 +34448,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 200, + "weight": 190, "cookies": false, "type": "", "demo": "users\/list-logs.md", @@ -34502,7 +34534,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 199, + "weight": 189, "cookies": false, "type": "", "demo": "users\/list-memberships.md", @@ -34599,7 +34631,7 @@ "x-appwrite": { "method": "updateMfa", "group": "users", - "weight": 213, + "weight": 203, "cookies": false, "type": "", "demo": "users\/update-mfa.md", @@ -34733,7 +34765,7 @@ "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", - "weight": 218, + "weight": 208, "cookies": false, "type": "", "demo": "users\/delete-mfa-authenticator.md", @@ -34868,7 +34900,7 @@ "x-appwrite": { "method": "listMfaFactors", "group": "mfa", - "weight": 214, + "weight": 204, "cookies": false, "type": "", "demo": "users\/list-mfa-factors.md", @@ -34986,7 +35018,7 @@ "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", - "weight": 215, + "weight": 205, "cookies": false, "type": "", "demo": "users\/get-mfa-recovery-codes.md", @@ -35102,7 +35134,7 @@ "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", - "weight": 217, + "weight": 207, "cookies": false, "type": "", "demo": "users\/update-mfa-recovery-codes.md", @@ -35218,7 +35250,7 @@ "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", - "weight": 216, + "weight": 206, "cookies": false, "type": "", "demo": "users\/create-mfa-recovery-codes.md", @@ -35336,7 +35368,7 @@ "x-appwrite": { "method": "updateName", "group": "users", - "weight": 206, + "weight": 196, "cookies": false, "type": "", "demo": "users\/update-name.md", @@ -35417,7 +35449,7 @@ "x-appwrite": { "method": "updatePassword", "group": "users", - "weight": 207, + "weight": 197, "cookies": false, "type": "", "demo": "users\/update-password.md", @@ -35498,7 +35530,7 @@ "x-appwrite": { "method": "updatePhone", "group": "users", - "weight": 209, + "weight": 199, "cookies": false, "type": "", "demo": "users\/update-phone.md", @@ -35579,7 +35611,7 @@ "x-appwrite": { "method": "getPrefs", "group": "users", - "weight": 196, + "weight": 186, "cookies": false, "type": "", "demo": "users\/get-prefs.md", @@ -35639,7 +35671,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "users", - "weight": 211, + "weight": 201, "cookies": false, "type": "", "demo": "users\/update-prefs.md", @@ -35720,7 +35752,7 @@ "x-appwrite": { "method": "listSessions", "group": "sessions", - "weight": 198, + "weight": 188, "cookies": false, "type": "", "demo": "users\/list-sessions.md", @@ -35791,7 +35823,7 @@ "x-appwrite": { "method": "createSession", "group": "sessions", - "weight": 219, + "weight": 209, "cookies": false, "type": "", "demo": "users\/create-session.md", @@ -35844,7 +35876,7 @@ "x-appwrite": { "method": "deleteSessions", "group": "sessions", - "weight": 222, + "weight": 212, "cookies": false, "type": "", "demo": "users\/delete-sessions.md", @@ -35899,7 +35931,7 @@ "x-appwrite": { "method": "deleteSession", "group": "sessions", - "weight": 221, + "weight": 211, "cookies": false, "type": "", "demo": "users\/delete-session.md", @@ -35971,7 +36003,7 @@ "x-appwrite": { "method": "updateStatus", "group": "users", - "weight": 203, + "weight": 193, "cookies": false, "type": "", "demo": "users\/update-status.md", @@ -36052,7 +36084,7 @@ "x-appwrite": { "method": "listTargets", "group": "targets", - "weight": 201, + "weight": 191, "cookies": false, "type": "", "demo": "users\/list-targets.md", @@ -36137,7 +36169,7 @@ "x-appwrite": { "method": "createTarget", "group": "targets", - "weight": 193, + "weight": 183, "cookies": false, "type": "", "demo": "users\/create-target.md", @@ -36248,7 +36280,7 @@ "x-appwrite": { "method": "getTarget", "group": "targets", - "weight": 197, + "weight": 187, "cookies": false, "type": "", "demo": "users\/get-target.md", @@ -36319,7 +36351,7 @@ "x-appwrite": { "method": "updateTarget", "group": "targets", - "weight": 212, + "weight": 202, "cookies": false, "type": "", "demo": "users\/update-target.md", @@ -36409,7 +36441,7 @@ "x-appwrite": { "method": "deleteTarget", "group": "targets", - "weight": 224, + "weight": 214, "cookies": false, "type": "", "demo": "users\/delete-target.md", @@ -36482,7 +36514,7 @@ "x-appwrite": { "method": "createToken", "group": "sessions", - "weight": 220, + "weight": 210, "cookies": false, "type": "", "demo": "users\/create-token.md", @@ -36565,7 +36597,7 @@ "x-appwrite": { "method": "updateEmailVerification", "group": "users", - "weight": 210, + "weight": 200, "cookies": false, "type": "", "demo": "users\/update-email-verification.md", @@ -36646,7 +36678,7 @@ "x-appwrite": { "method": "updatePhoneVerification", "group": "users", - "weight": 205, + "weight": 195, "cookies": false, "type": "", "demo": "users\/update-phone-verification.md", diff --git a/app/config/specs/open-api3-latest-client.json b/app/config/specs/open-api3-latest-client.json index 9adb21d960..2bb33e4813 100644 --- a/app/config/specs/open-api3-latest-client.json +++ b/app/config/specs/open-api3-latest-client.json @@ -258,7 +258,7 @@ "x-appwrite": { "method": "listIdentities", "group": "identities", - "weight": 58, + "weight": 48, "cookies": false, "type": "", "demo": "account\/list-identities.md", @@ -328,7 +328,7 @@ "x-appwrite": { "method": "deleteIdentity", "group": "identities", - "weight": 59, + "weight": 49, "cookies": false, "type": "", "demo": "account\/delete-identity.md", @@ -517,7 +517,7 @@ "x-appwrite": { "method": "updateMFA", "group": "mfa", - "weight": 45, + "weight": 306, "cookies": false, "type": "", "demo": "account\/update-mfa.md", @@ -587,7 +587,7 @@ "x-appwrite": { "method": "createMfaAuthenticator", "group": "mfa", - "weight": 47, + "weight": 308, "cookies": false, "type": "", "demo": "account\/create-mfa-authenticator.md", @@ -707,7 +707,7 @@ "x-appwrite": { "method": "updateMfaAuthenticator", "group": "mfa", - "weight": 48, + "weight": 309, "cookies": false, "type": "", "demo": "account\/update-mfa-authenticator.md", @@ -843,7 +843,7 @@ "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", - "weight": 52, + "weight": 310, "cookies": false, "type": "", "demo": "account\/delete-mfa-authenticator.md", @@ -939,7 +939,7 @@ ] } }, - "\/account\/mfa\/challenge": { + "\/account\/mfa\/challenges": { "post": { "summary": "Create MFA challenge", "operationId": "accountCreateMfaChallenge", @@ -963,7 +963,7 @@ "x-appwrite": { "method": "createMfaChallenge", "group": "mfa", - "weight": 53, + "weight": 314, "cookies": false, "type": "", "demo": "account\/create-mfa-challenge.md", @@ -1091,7 +1091,7 @@ "x-appwrite": { "method": "updateMfaChallenge", "group": "mfa", - "weight": 54, + "weight": 315, "cookies": false, "type": "", "demo": "account\/update-mfa-challenge.md", @@ -1225,7 +1225,7 @@ "x-appwrite": { "method": "listMfaFactors", "group": "mfa", - "weight": 46, + "weight": 307, "cookies": false, "type": "", "demo": "account\/list-mfa-factors.md", @@ -1322,7 +1322,7 @@ "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", - "weight": 51, + "weight": 313, "cookies": false, "type": "", "demo": "account\/get-mfa-recovery-codes.md", @@ -1417,7 +1417,7 @@ "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", - "weight": 49, + "weight": 311, "cookies": false, "type": "", "demo": "account\/create-mfa-recovery-codes.md", @@ -1512,7 +1512,7 @@ "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", - "weight": 50, + "weight": 312, "cookies": false, "type": "", "demo": "account\/update-mfa-recovery-codes.md", @@ -2918,7 +2918,7 @@ "x-appwrite": { "method": "createPushTarget", "group": "pushTargets", - "weight": 55, + "weight": 45, "cookies": false, "type": "", "demo": "account\/create-push-target.md", @@ -2997,7 +2997,7 @@ "x-appwrite": { "method": "updatePushTarget", "group": "pushTargets", - "weight": 56, + "weight": 46, "cookies": false, "type": "", "demo": "account\/update-push-target.md", @@ -3068,7 +3068,7 @@ "x-appwrite": { "method": "deletePushTarget", "group": "pushTargets", - "weight": 57, + "weight": 47, "cookies": false, "type": "", "demo": "account\/delete-push-target.md", @@ -3879,7 +3879,7 @@ "x-appwrite": { "method": "getBrowser", "group": null, - "weight": 61, + "weight": 51, "cookies": false, "type": "location", "demo": "avatars\/get-browser.md", @@ -4005,7 +4005,7 @@ "x-appwrite": { "method": "getCreditCard", "group": null, - "weight": 60, + "weight": 50, "cookies": false, "type": "location", "demo": "avatars\/get-credit-card.md", @@ -4137,7 +4137,7 @@ "x-appwrite": { "method": "getFavicon", "group": null, - "weight": 64, + "weight": 54, "cookies": false, "type": "location", "demo": "avatars\/get-favicon.md", @@ -4195,7 +4195,7 @@ "x-appwrite": { "method": "getFlag", "group": null, - "weight": 62, + "weight": 52, "cookies": false, "type": "location", "demo": "avatars\/get-flag.md", @@ -4683,7 +4683,7 @@ "x-appwrite": { "method": "getImage", "group": null, - "weight": 63, + "weight": 53, "cookies": false, "type": "location", "demo": "avatars\/get-image.md", @@ -4765,7 +4765,7 @@ "x-appwrite": { "method": "getInitials", "group": null, - "weight": 66, + "weight": 56, "cookies": false, "type": "location", "demo": "avatars\/get-initials.md", @@ -4857,7 +4857,7 @@ "x-appwrite": { "method": "getQR", "group": null, - "weight": 65, + "weight": 55, "cookies": false, "type": "location", "demo": "avatars\/get-qr.md", @@ -4949,7 +4949,7 @@ "x-appwrite": { "method": "getScreenshot", "group": null, - "weight": 67, + "weight": 57, "cookies": false, "type": "location", "demo": "avatars\/get-screenshot.md", @@ -7370,7 +7370,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 251, + "weight": 241, "cookies": false, "type": "graphql", "demo": "graphql\/query.md", @@ -7422,7 +7422,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 250, + "weight": 240, "cookies": false, "type": "graphql", "demo": "graphql\/mutation.md", @@ -7474,7 +7474,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 71, + "weight": 61, "cookies": false, "type": "", "demo": "locale\/get.md", @@ -7526,7 +7526,7 @@ "x-appwrite": { "method": "listCodes", "group": null, - "weight": 72, + "weight": 62, "cookies": false, "type": "", "demo": "locale\/list-codes.md", @@ -7578,7 +7578,7 @@ "x-appwrite": { "method": "listContinents", "group": null, - "weight": 76, + "weight": 66, "cookies": false, "type": "", "demo": "locale\/list-continents.md", @@ -7630,7 +7630,7 @@ "x-appwrite": { "method": "listCountries", "group": null, - "weight": 73, + "weight": 63, "cookies": false, "type": "", "demo": "locale\/list-countries.md", @@ -7682,7 +7682,7 @@ "x-appwrite": { "method": "listCountriesEU", "group": null, - "weight": 74, + "weight": 64, "cookies": false, "type": "", "demo": "locale\/list-countries-eu.md", @@ -7734,7 +7734,7 @@ "x-appwrite": { "method": "listCountriesPhones", "group": null, - "weight": 75, + "weight": 65, "cookies": false, "type": "", "demo": "locale\/list-countries-phones.md", @@ -7786,7 +7786,7 @@ "x-appwrite": { "method": "listCurrencies", "group": null, - "weight": 77, + "weight": 67, "cookies": false, "type": "", "demo": "locale\/list-currencies.md", @@ -7838,7 +7838,7 @@ "x-appwrite": { "method": "listLanguages", "group": null, - "weight": 78, + "weight": 68, "cookies": false, "type": "", "demo": "locale\/list-languages.md", @@ -7890,7 +7890,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 300, + "weight": 290, "cookies": false, "type": "", "demo": "messaging\/create-subscriber.md", @@ -7973,7 +7973,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 304, + "weight": 294, "cookies": false, "type": "", "demo": "messaging\/delete-subscriber.md", @@ -8048,7 +8048,7 @@ "x-appwrite": { "method": "listFiles", "group": "files", - "weight": 161, + "weight": 151, "cookies": false, "type": "", "demo": "storage\/list-files.md", @@ -8145,7 +8145,7 @@ "x-appwrite": { "method": "createFile", "group": "files", - "weight": 160, + "weight": 150, "cookies": false, "type": "upload", "demo": "storage\/create-file.md", @@ -8244,7 +8244,7 @@ "x-appwrite": { "method": "getFile", "group": "files", - "weight": 162, + "weight": 152, "cookies": false, "type": "", "demo": "storage\/get-file.md", @@ -8316,7 +8316,7 @@ "x-appwrite": { "method": "updateFile", "group": "files", - "weight": 167, + "weight": 157, "cookies": false, "type": "", "demo": "storage\/update-file.md", @@ -8407,7 +8407,7 @@ "x-appwrite": { "method": "deleteFile", "group": "files", - "weight": 168, + "weight": 158, "cookies": false, "type": "", "demo": "storage\/delete-file.md", @@ -8474,7 +8474,7 @@ "x-appwrite": { "method": "getFileDownload", "group": "files", - "weight": 164, + "weight": 154, "cookies": false, "type": "location", "demo": "storage\/get-file-download.md", @@ -8552,7 +8552,7 @@ "x-appwrite": { "method": "getFilePreview", "group": "files", - "weight": 163, + "weight": 153, "cookies": false, "type": "location", "demo": "storage\/get-file-preview.md", @@ -8780,7 +8780,7 @@ "x-appwrite": { "method": "getFileView", "group": "files", - "weight": 165, + "weight": 155, "cookies": false, "type": "location", "demo": "storage\/get-file-view.md", @@ -10281,7 +10281,7 @@ "x-appwrite": { "method": "list", "group": "teams", - "weight": 172, + "weight": 162, "cookies": false, "type": "", "demo": "teams\/list.md", @@ -10368,7 +10368,7 @@ "x-appwrite": { "method": "create", "group": "teams", - "weight": 171, + "weight": 161, "cookies": false, "type": "", "demo": "teams\/create.md", @@ -10453,7 +10453,7 @@ "x-appwrite": { "method": "get", "group": "teams", - "weight": 173, + "weight": 163, "cookies": false, "type": "", "demo": "teams\/get.md", @@ -10515,7 +10515,7 @@ "x-appwrite": { "method": "updateName", "group": "teams", - "weight": 175, + "weight": 165, "cookies": false, "type": "", "demo": "teams\/update-name.md", @@ -10589,7 +10589,7 @@ "x-appwrite": { "method": "delete", "group": "teams", - "weight": 177, + "weight": 167, "cookies": false, "type": "", "demo": "teams\/delete.md", @@ -10653,7 +10653,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 179, + "weight": 169, "cookies": false, "type": "", "demo": "teams\/list-memberships.md", @@ -10750,7 +10750,7 @@ "x-appwrite": { "method": "createMembership", "group": "memberships", - "weight": 178, + "weight": 168, "cookies": false, "type": "", "demo": "teams\/create-membership.md", @@ -10861,7 +10861,7 @@ "x-appwrite": { "method": "getMembership", "group": "memberships", - "weight": 180, + "weight": 170, "cookies": false, "type": "", "demo": "teams\/get-membership.md", @@ -10933,7 +10933,7 @@ "x-appwrite": { "method": "updateMembership", "group": "memberships", - "weight": 181, + "weight": 171, "cookies": false, "type": "", "demo": "teams\/update-membership.md", @@ -11020,7 +11020,7 @@ "x-appwrite": { "method": "deleteMembership", "group": "memberships", - "weight": 183, + "weight": 173, "cookies": false, "type": "", "demo": "teams\/delete-membership.md", @@ -11094,7 +11094,7 @@ "x-appwrite": { "method": "updateMembershipStatus", "group": "memberships", - "weight": 182, + "weight": 172, "cookies": false, "type": "", "demo": "teams\/update-membership-status.md", @@ -11192,7 +11192,7 @@ "x-appwrite": { "method": "getPrefs", "group": "teams", - "weight": 174, + "weight": 164, "cookies": false, "type": "", "demo": "teams\/get-prefs.md", @@ -11253,7 +11253,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "teams", - "weight": 176, + "weight": 166, "cookies": false, "type": "", "demo": "teams\/update-prefs.md", diff --git a/app/config/specs/open-api3-latest-console.json b/app/config/specs/open-api3-latest-console.json index 365f926685..8d1f1e5880 100644 --- a/app/config/specs/open-api3-latest-console.json +++ b/app/config/specs/open-api3-latest-console.json @@ -295,7 +295,7 @@ "x-appwrite": { "method": "listIdentities", "group": "identities", - "weight": 58, + "weight": 48, "cookies": false, "type": "", "demo": "account\/list-identities.md", @@ -364,7 +364,7 @@ "x-appwrite": { "method": "deleteIdentity", "group": "identities", - "weight": 59, + "weight": 49, "cookies": false, "type": "", "demo": "account\/delete-identity.md", @@ -551,7 +551,7 @@ "x-appwrite": { "method": "updateMFA", "group": "mfa", - "weight": 45, + "weight": 306, "cookies": false, "type": "", "demo": "account\/update-mfa.md", @@ -620,7 +620,7 @@ "x-appwrite": { "method": "createMfaAuthenticator", "group": "mfa", - "weight": 47, + "weight": 308, "cookies": false, "type": "", "demo": "account\/create-mfa-authenticator.md", @@ -739,7 +739,7 @@ "x-appwrite": { "method": "updateMfaAuthenticator", "group": "mfa", - "weight": 48, + "weight": 309, "cookies": false, "type": "", "demo": "account\/update-mfa-authenticator.md", @@ -874,7 +874,7 @@ "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", - "weight": 52, + "weight": 310, "cookies": false, "type": "", "demo": "account\/delete-mfa-authenticator.md", @@ -969,7 +969,7 @@ ] } }, - "\/account\/mfa\/challenge": { + "\/account\/mfa\/challenges": { "post": { "summary": "Create MFA challenge", "operationId": "accountCreateMfaChallenge", @@ -993,7 +993,7 @@ "x-appwrite": { "method": "createMfaChallenge", "group": "mfa", - "weight": 53, + "weight": 314, "cookies": false, "type": "", "demo": "account\/create-mfa-challenge.md", @@ -1121,7 +1121,7 @@ "x-appwrite": { "method": "updateMfaChallenge", "group": "mfa", - "weight": 54, + "weight": 315, "cookies": false, "type": "", "demo": "account\/update-mfa-challenge.md", @@ -1254,7 +1254,7 @@ "x-appwrite": { "method": "listMfaFactors", "group": "mfa", - "weight": 46, + "weight": 307, "cookies": false, "type": "", "demo": "account\/list-mfa-factors.md", @@ -1350,7 +1350,7 @@ "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", - "weight": 51, + "weight": 313, "cookies": false, "type": "", "demo": "account\/get-mfa-recovery-codes.md", @@ -1444,7 +1444,7 @@ "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", - "weight": 49, + "weight": 311, "cookies": false, "type": "", "demo": "account\/create-mfa-recovery-codes.md", @@ -1538,7 +1538,7 @@ "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", - "weight": 50, + "weight": 312, "cookies": false, "type": "", "demo": "account\/update-mfa-recovery-codes.md", @@ -2930,7 +2930,7 @@ "x-appwrite": { "method": "createPushTarget", "group": "pushTargets", - "weight": 55, + "weight": 45, "cookies": false, "type": "", "demo": "account\/create-push-target.md", @@ -3008,7 +3008,7 @@ "x-appwrite": { "method": "updatePushTarget", "group": "pushTargets", - "weight": 56, + "weight": 46, "cookies": false, "type": "", "demo": "account\/update-push-target.md", @@ -3078,7 +3078,7 @@ "x-appwrite": { "method": "deletePushTarget", "group": "pushTargets", - "weight": 57, + "weight": 47, "cookies": false, "type": "", "demo": "account\/delete-push-target.md", @@ -3884,7 +3884,7 @@ "x-appwrite": { "method": "getBrowser", "group": null, - "weight": 61, + "weight": 51, "cookies": false, "type": "location", "demo": "avatars\/get-browser.md", @@ -4010,7 +4010,7 @@ "x-appwrite": { "method": "getCreditCard", "group": null, - "weight": 60, + "weight": 50, "cookies": false, "type": "location", "demo": "avatars\/get-credit-card.md", @@ -4142,7 +4142,7 @@ "x-appwrite": { "method": "getFavicon", "group": null, - "weight": 64, + "weight": 54, "cookies": false, "type": "location", "demo": "avatars\/get-favicon.md", @@ -4200,7 +4200,7 @@ "x-appwrite": { "method": "getFlag", "group": null, - "weight": 62, + "weight": 52, "cookies": false, "type": "location", "demo": "avatars\/get-flag.md", @@ -4688,7 +4688,7 @@ "x-appwrite": { "method": "getImage", "group": null, - "weight": 63, + "weight": 53, "cookies": false, "type": "location", "demo": "avatars\/get-image.md", @@ -4770,7 +4770,7 @@ "x-appwrite": { "method": "getInitials", "group": null, - "weight": 66, + "weight": 56, "cookies": false, "type": "location", "demo": "avatars\/get-initials.md", @@ -4862,7 +4862,7 @@ "x-appwrite": { "method": "getQR", "group": null, - "weight": 65, + "weight": 55, "cookies": false, "type": "location", "demo": "avatars\/get-qr.md", @@ -4954,7 +4954,7 @@ "x-appwrite": { "method": "getScreenshot", "group": null, - "weight": 67, + "weight": 57, "cookies": false, "type": "location", "demo": "avatars\/get-screenshot.md", @@ -5673,7 +5673,7 @@ "x-appwrite": { "method": "chat", "group": "console", - "weight": 253, + "weight": 243, "cookies": false, "type": "", "demo": "assistant\/chat.md", @@ -5808,7 +5808,7 @@ "x-appwrite": { "method": "variables", "group": "console", - "weight": 252, + "weight": 242, "cookies": false, "type": "", "demo": "console\/variables.md", @@ -7071,6 +7071,22 @@ "type": "boolean", "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", "x-example": false + }, + "attributes": { + "type": "array", + "description": "Array of attribute definitions to create. Each attribute should contain: key (string), type (string: string, integer, float, boolean, datetime, relationship), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.", + "x-example": null, + "items": { + "type": "object" + } + }, + "indexes": { + "type": "array", + "description": "Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of attribute keys), orders (array of ASC\/DESC, optional), and lengths (array of integers, optional).", + "x-example": null, + "items": { + "type": "object" + } } }, "required": [ @@ -15663,7 +15679,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 251, + "weight": 241, "cookies": false, "type": "graphql", "demo": "graphql\/query.md", @@ -15715,7 +15731,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 250, + "weight": 240, "cookies": false, "type": "graphql", "demo": "graphql\/mutation.md", @@ -15767,7 +15783,7 @@ "x-appwrite": { "method": "get", "group": "health", - "weight": 79, + "weight": 69, "cookies": false, "type": "", "demo": "health\/get.md", @@ -15816,7 +15832,7 @@ "x-appwrite": { "method": "getAntivirus", "group": "health", - "weight": 100, + "weight": 90, "cookies": false, "type": "", "demo": "health\/get-antivirus.md", @@ -15865,7 +15881,7 @@ "x-appwrite": { "method": "getCache", "group": "health", - "weight": 82, + "weight": 72, "cookies": false, "type": "", "demo": "health\/get-cache.md", @@ -15914,7 +15930,7 @@ "x-appwrite": { "method": "getCertificate", "group": "health", - "weight": 87, + "weight": 77, "cookies": false, "type": "", "demo": "health\/get-certificate.md", @@ -15974,7 +15990,7 @@ "x-appwrite": { "method": "getDB", "group": "health", - "weight": 81, + "weight": 71, "cookies": false, "type": "", "demo": "health\/get-db.md", @@ -16023,7 +16039,7 @@ "x-appwrite": { "method": "getPubSub", "group": "health", - "weight": 83, + "weight": 73, "cookies": false, "type": "", "demo": "health\/get-pub-sub.md", @@ -16072,7 +16088,7 @@ "x-appwrite": { "method": "getQueueBuilds", "group": "queue", - "weight": 89, + "weight": 79, "cookies": false, "type": "", "demo": "health\/get-queue-builds.md", @@ -16134,7 +16150,7 @@ "x-appwrite": { "method": "getQueueCertificates", "group": "queue", - "weight": 88, + "weight": 78, "cookies": false, "type": "", "demo": "health\/get-queue-certificates.md", @@ -16196,7 +16212,7 @@ "x-appwrite": { "method": "getQueueDatabases", "group": "queue", - "weight": 90, + "weight": 80, "cookies": false, "type": "", "demo": "health\/get-queue-databases.md", @@ -16269,7 +16285,7 @@ "x-appwrite": { "method": "getQueueDeletes", "group": "queue", - "weight": 91, + "weight": 81, "cookies": false, "type": "", "demo": "health\/get-queue-deletes.md", @@ -16331,7 +16347,7 @@ "x-appwrite": { "method": "getFailedJobs", "group": "queue", - "weight": 101, + "weight": 91, "cookies": false, "type": "", "demo": "health\/get-failed-jobs.md", @@ -16419,7 +16435,7 @@ "x-appwrite": { "method": "getQueueFunctions", "group": "queue", - "weight": 95, + "weight": 85, "cookies": false, "type": "", "demo": "health\/get-queue-functions.md", @@ -16481,7 +16497,7 @@ "x-appwrite": { "method": "getQueueLogs", "group": "queue", - "weight": 86, + "weight": 76, "cookies": false, "type": "", "demo": "health\/get-queue-logs.md", @@ -16543,7 +16559,7 @@ "x-appwrite": { "method": "getQueueMails", "group": "queue", - "weight": 92, + "weight": 82, "cookies": false, "type": "", "demo": "health\/get-queue-mails.md", @@ -16605,7 +16621,7 @@ "x-appwrite": { "method": "getQueueMessaging", "group": "queue", - "weight": 93, + "weight": 83, "cookies": false, "type": "", "demo": "health\/get-queue-messaging.md", @@ -16667,7 +16683,7 @@ "x-appwrite": { "method": "getQueueMigrations", "group": "queue", - "weight": 94, + "weight": 84, "cookies": false, "type": "", "demo": "health\/get-queue-migrations.md", @@ -16729,7 +16745,7 @@ "x-appwrite": { "method": "getQueueStatsResources", "group": "queue", - "weight": 96, + "weight": 86, "cookies": false, "type": "", "demo": "health\/get-queue-stats-resources.md", @@ -16791,7 +16807,7 @@ "x-appwrite": { "method": "getQueueUsage", "group": "queue", - "weight": 97, + "weight": 87, "cookies": false, "type": "", "demo": "health\/get-queue-usage.md", @@ -16853,7 +16869,7 @@ "x-appwrite": { "method": "getQueueWebhooks", "group": "queue", - "weight": 85, + "weight": 75, "cookies": false, "type": "", "demo": "health\/get-queue-webhooks.md", @@ -16915,7 +16931,7 @@ "x-appwrite": { "method": "getStorage", "group": "storage", - "weight": 99, + "weight": 89, "cookies": false, "type": "", "demo": "health\/get-storage.md", @@ -16964,7 +16980,7 @@ "x-appwrite": { "method": "getStorageLocal", "group": "storage", - "weight": 98, + "weight": 88, "cookies": false, "type": "", "demo": "health\/get-storage-local.md", @@ -17013,7 +17029,7 @@ "x-appwrite": { "method": "getTime", "group": "health", - "weight": 84, + "weight": 74, "cookies": false, "type": "", "demo": "health\/get-time.md", @@ -17062,7 +17078,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 71, + "weight": 61, "cookies": false, "type": "", "demo": "locale\/get.md", @@ -17114,7 +17130,7 @@ "x-appwrite": { "method": "listCodes", "group": null, - "weight": 72, + "weight": 62, "cookies": false, "type": "", "demo": "locale\/list-codes.md", @@ -17166,7 +17182,7 @@ "x-appwrite": { "method": "listContinents", "group": null, - "weight": 76, + "weight": 66, "cookies": false, "type": "", "demo": "locale\/list-continents.md", @@ -17218,7 +17234,7 @@ "x-appwrite": { "method": "listCountries", "group": null, - "weight": 73, + "weight": 63, "cookies": false, "type": "", "demo": "locale\/list-countries.md", @@ -17270,7 +17286,7 @@ "x-appwrite": { "method": "listCountriesEU", "group": null, - "weight": 74, + "weight": 64, "cookies": false, "type": "", "demo": "locale\/list-countries-eu.md", @@ -17322,7 +17338,7 @@ "x-appwrite": { "method": "listCountriesPhones", "group": null, - "weight": 75, + "weight": 65, "cookies": false, "type": "", "demo": "locale\/list-countries-phones.md", @@ -17374,7 +17390,7 @@ "x-appwrite": { "method": "listCurrencies", "group": null, - "weight": 77, + "weight": 67, "cookies": false, "type": "", "demo": "locale\/list-currencies.md", @@ -17426,7 +17442,7 @@ "x-appwrite": { "method": "listLanguages", "group": null, - "weight": 78, + "weight": 68, "cookies": false, "type": "", "demo": "locale\/list-languages.md", @@ -17478,7 +17494,7 @@ "x-appwrite": { "method": "listMessages", "group": "messages", - "weight": 308, + "weight": 298, "cookies": false, "type": "", "demo": "messaging\/list-messages.md", @@ -17565,7 +17581,7 @@ "x-appwrite": { "method": "createEmail", "group": "messages", - "weight": 305, + "weight": 295, "cookies": false, "type": "", "demo": "messaging\/create-email.md", @@ -17710,7 +17726,7 @@ "x-appwrite": { "method": "updateEmail", "group": "messages", - "weight": 312, + "weight": 302, "cookies": false, "type": "", "demo": "messaging\/update-email.md", @@ -17867,7 +17883,7 @@ "x-appwrite": { "method": "createPush", "group": "messages", - "weight": 307, + "weight": 297, "cookies": false, "type": "", "demo": "messaging\/create-push.md", @@ -18043,7 +18059,7 @@ "x-appwrite": { "method": "updatePush", "group": "messages", - "weight": 314, + "weight": 304, "cookies": false, "type": "", "demo": "messaging\/update-push.md", @@ -18239,7 +18255,7 @@ "x-appwrite": { "method": "createSms", "group": "messages", - "weight": 306, + "weight": 296, "cookies": false, "type": "", "demo": "messaging\/create-sms.md", @@ -18417,7 +18433,7 @@ "x-appwrite": { "method": "updateSms", "group": "messages", - "weight": 313, + "weight": 303, "cookies": false, "type": "", "demo": "messaging\/update-sms.md", @@ -18601,7 +18617,7 @@ "x-appwrite": { "method": "getMessage", "group": "messages", - "weight": 311, + "weight": 301, "cookies": false, "type": "", "demo": "messaging\/get-message.md", @@ -18654,7 +18670,7 @@ "x-appwrite": { "method": "delete", "group": "messages", - "weight": 315, + "weight": 305, "cookies": false, "type": "", "demo": "messaging\/delete.md", @@ -18716,7 +18732,7 @@ "x-appwrite": { "method": "listMessageLogs", "group": "logs", - "weight": 309, + "weight": 299, "cookies": false, "type": "", "demo": "messaging\/list-message-logs.md", @@ -18802,7 +18818,7 @@ "x-appwrite": { "method": "listTargets", "group": "messages", - "weight": 310, + "weight": 300, "cookies": false, "type": "", "demo": "messaging\/list-targets.md", @@ -18888,7 +18904,7 @@ "x-appwrite": { "method": "listProviders", "group": "providers", - "weight": 279, + "weight": 269, "cookies": false, "type": "", "demo": "messaging\/list-providers.md", @@ -18975,7 +18991,7 @@ "x-appwrite": { "method": "createApnsProvider", "group": "providers", - "weight": 278, + "weight": 268, "cookies": false, "type": "", "demo": "messaging\/create-apns-provider.md", @@ -19151,7 +19167,7 @@ "x-appwrite": { "method": "updateApnsProvider", "group": "providers", - "weight": 292, + "weight": 282, "cookies": false, "type": "", "demo": "messaging\/update-apns-provider.md", @@ -19329,7 +19345,7 @@ "x-appwrite": { "method": "createFcmProvider", "group": "providers", - "weight": 277, + "weight": 267, "cookies": false, "type": "", "demo": "messaging\/create-fcm-provider.md", @@ -19478,7 +19494,7 @@ "x-appwrite": { "method": "updateFcmProvider", "group": "providers", - "weight": 291, + "weight": 281, "cookies": false, "type": "", "demo": "messaging\/update-fcm-provider.md", @@ -19628,7 +19644,7 @@ "x-appwrite": { "method": "createMailgunProvider", "group": "providers", - "weight": 268, + "weight": 258, "cookies": false, "type": "", "demo": "messaging\/create-mailgun-provider.md", @@ -19745,7 +19761,7 @@ "x-appwrite": { "method": "updateMailgunProvider", "group": "providers", - "weight": 282, + "weight": 272, "cookies": false, "type": "", "demo": "messaging\/update-mailgun-provider.md", @@ -19865,7 +19881,7 @@ "x-appwrite": { "method": "createMsg91Provider", "group": "providers", - "weight": 272, + "weight": 262, "cookies": false, "type": "", "demo": "messaging\/create-msg-91-provider.md", @@ -19961,7 +19977,7 @@ "x-appwrite": { "method": "updateMsg91Provider", "group": "providers", - "weight": 286, + "weight": 276, "cookies": false, "type": "", "demo": "messaging\/update-msg-91-provider.md", @@ -20060,7 +20076,7 @@ "x-appwrite": { "method": "createResendProvider", "group": "providers", - "weight": 270, + "weight": 260, "cookies": false, "type": "", "demo": "messaging\/create-resend-provider.md", @@ -20166,7 +20182,7 @@ "x-appwrite": { "method": "updateResendProvider", "group": "providers", - "weight": 284, + "weight": 274, "cookies": false, "type": "", "demo": "messaging\/update-resend-provider.md", @@ -20275,7 +20291,7 @@ "x-appwrite": { "method": "createSendgridProvider", "group": "providers", - "weight": 269, + "weight": 259, "cookies": false, "type": "", "demo": "messaging\/create-sendgrid-provider.md", @@ -20381,7 +20397,7 @@ "x-appwrite": { "method": "updateSendgridProvider", "group": "providers", - "weight": 283, + "weight": 273, "cookies": false, "type": "", "demo": "messaging\/update-sendgrid-provider.md", @@ -20490,7 +20506,7 @@ "x-appwrite": { "method": "createSmtpProvider", "group": "providers", - "weight": 271, + "weight": 261, "cookies": false, "type": "", "demo": "messaging\/create-smtp-provider.md", @@ -20718,7 +20734,7 @@ "x-appwrite": { "method": "updateSmtpProvider", "group": "providers", - "weight": 285, + "weight": 275, "cookies": false, "type": "", "demo": "messaging\/update-smtp-provider.md", @@ -20946,7 +20962,7 @@ "x-appwrite": { "method": "createTelesignProvider", "group": "providers", - "weight": 273, + "weight": 263, "cookies": false, "type": "", "demo": "messaging\/create-telesign-provider.md", @@ -21042,7 +21058,7 @@ "x-appwrite": { "method": "updateTelesignProvider", "group": "providers", - "weight": 287, + "weight": 277, "cookies": false, "type": "", "demo": "messaging\/update-telesign-provider.md", @@ -21141,7 +21157,7 @@ "x-appwrite": { "method": "createTextmagicProvider", "group": "providers", - "weight": 274, + "weight": 264, "cookies": false, "type": "", "demo": "messaging\/create-textmagic-provider.md", @@ -21237,7 +21253,7 @@ "x-appwrite": { "method": "updateTextmagicProvider", "group": "providers", - "weight": 288, + "weight": 278, "cookies": false, "type": "", "demo": "messaging\/update-textmagic-provider.md", @@ -21336,7 +21352,7 @@ "x-appwrite": { "method": "createTwilioProvider", "group": "providers", - "weight": 275, + "weight": 265, "cookies": false, "type": "", "demo": "messaging\/create-twilio-provider.md", @@ -21432,7 +21448,7 @@ "x-appwrite": { "method": "updateTwilioProvider", "group": "providers", - "weight": 289, + "weight": 279, "cookies": false, "type": "", "demo": "messaging\/update-twilio-provider.md", @@ -21531,7 +21547,7 @@ "x-appwrite": { "method": "createVonageProvider", "group": "providers", - "weight": 276, + "weight": 266, "cookies": false, "type": "", "demo": "messaging\/create-vonage-provider.md", @@ -21627,7 +21643,7 @@ "x-appwrite": { "method": "updateVonageProvider", "group": "providers", - "weight": 290, + "weight": 280, "cookies": false, "type": "", "demo": "messaging\/update-vonage-provider.md", @@ -21726,7 +21742,7 @@ "x-appwrite": { "method": "getProvider", "group": "providers", - "weight": 281, + "weight": 271, "cookies": false, "type": "", "demo": "messaging\/get-provider.md", @@ -21779,7 +21795,7 @@ "x-appwrite": { "method": "deleteProvider", "group": "providers", - "weight": 293, + "weight": 283, "cookies": false, "type": "", "demo": "messaging\/delete-provider.md", @@ -21841,7 +21857,7 @@ "x-appwrite": { "method": "listProviderLogs", "group": "providers", - "weight": 280, + "weight": 270, "cookies": false, "type": "", "demo": "messaging\/list-provider-logs.md", @@ -21927,7 +21943,7 @@ "x-appwrite": { "method": "listSubscriberLogs", "group": "subscribers", - "weight": 302, + "weight": 292, "cookies": false, "type": "", "demo": "messaging\/list-subscriber-logs.md", @@ -22013,7 +22029,7 @@ "x-appwrite": { "method": "listTopics", "group": "topics", - "weight": 295, + "weight": 285, "cookies": false, "type": "", "demo": "messaging\/list-topics.md", @@ -22098,7 +22114,7 @@ "x-appwrite": { "method": "createTopic", "group": "topics", - "weight": 294, + "weight": 284, "cookies": false, "type": "", "demo": "messaging\/create-topic.md", @@ -22181,7 +22197,7 @@ "x-appwrite": { "method": "getTopic", "group": "topics", - "weight": 297, + "weight": 287, "cookies": false, "type": "", "demo": "messaging\/get-topic.md", @@ -22241,7 +22257,7 @@ "x-appwrite": { "method": "updateTopic", "group": "topics", - "weight": 298, + "weight": 288, "cookies": false, "type": "", "demo": "messaging\/update-topic.md", @@ -22320,7 +22336,7 @@ "x-appwrite": { "method": "deleteTopic", "group": "topics", - "weight": 299, + "weight": 289, "cookies": false, "type": "", "demo": "messaging\/delete-topic.md", @@ -22382,7 +22398,7 @@ "x-appwrite": { "method": "listTopicLogs", "group": "topics", - "weight": 296, + "weight": 286, "cookies": false, "type": "", "demo": "messaging\/list-topic-logs.md", @@ -22468,7 +22484,7 @@ "x-appwrite": { "method": "listSubscribers", "group": "subscribers", - "weight": 301, + "weight": 291, "cookies": false, "type": "", "demo": "messaging\/list-subscribers.md", @@ -22563,7 +22579,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 300, + "weight": 290, "cookies": false, "type": "", "demo": "messaging\/create-subscriber.md", @@ -22653,7 +22669,7 @@ "x-appwrite": { "method": "getSubscriber", "group": "subscribers", - "weight": 303, + "weight": 293, "cookies": false, "type": "", "demo": "messaging\/get-subscriber.md", @@ -22716,7 +22732,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 304, + "weight": 294, "cookies": false, "type": "", "demo": "messaging\/delete-subscriber.md", @@ -22791,7 +22807,7 @@ "x-appwrite": { "method": "list", "group": null, - "weight": 260, + "weight": 250, "cookies": false, "type": "", "demo": "migrations\/list.md", @@ -22876,7 +22892,7 @@ "x-appwrite": { "method": "createAppwriteMigration", "group": null, - "weight": 254, + "weight": 244, "cookies": false, "type": "", "demo": "migrations\/create-appwrite-migration.md", @@ -22964,7 +22980,7 @@ "x-appwrite": { "method": "getAppwriteReport", "group": null, - "weight": 262, + "weight": 252, "cookies": false, "type": "", "demo": "migrations\/get-appwrite-report.md", @@ -23057,7 +23073,7 @@ "x-appwrite": { "method": "createCSVExport", "group": null, - "weight": 259, + "weight": 249, "cookies": false, "type": "", "demo": "migrations\/create-csv-export.md", @@ -23171,7 +23187,7 @@ "x-appwrite": { "method": "createCSVImport", "group": null, - "weight": 258, + "weight": 248, "cookies": false, "type": "", "demo": "migrations\/create-csv-import.md", @@ -23255,7 +23271,7 @@ "x-appwrite": { "method": "createFirebaseMigration", "group": null, - "weight": 255, + "weight": 245, "cookies": false, "type": "", "demo": "migrations\/create-firebase-migration.md", @@ -23331,7 +23347,7 @@ "x-appwrite": { "method": "getFirebaseReport", "group": null, - "weight": 263, + "weight": 253, "cookies": false, "type": "", "demo": "migrations\/get-firebase-report.md", @@ -23403,7 +23419,7 @@ "x-appwrite": { "method": "createNHostMigration", "group": null, - "weight": 257, + "weight": 247, "cookies": false, "type": "", "demo": "migrations\/create-n-host-migration.md", @@ -23514,7 +23530,7 @@ "x-appwrite": { "method": "getNHostReport", "group": null, - "weight": 265, + "weight": 255, "cookies": false, "type": "", "demo": "migrations\/get-n-host-report.md", @@ -23647,7 +23663,7 @@ "x-appwrite": { "method": "createSupabaseMigration", "group": null, - "weight": 256, + "weight": 246, "cookies": false, "type": "", "demo": "migrations\/create-supabase-migration.md", @@ -23752,7 +23768,7 @@ "x-appwrite": { "method": "getSupabaseReport", "group": null, - "weight": 264, + "weight": 254, "cookies": false, "type": "", "demo": "migrations\/get-supabase-report.md", @@ -23876,7 +23892,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 261, + "weight": 251, "cookies": false, "type": "", "demo": "migrations\/get.md", @@ -23934,7 +23950,7 @@ "x-appwrite": { "method": "retry", "group": null, - "weight": 266, + "weight": 256, "cookies": false, "type": "", "demo": "migrations\/retry.md", @@ -23985,7 +24001,7 @@ "x-appwrite": { "method": "delete", "group": null, - "weight": 267, + "weight": 257, "cookies": false, "type": "", "demo": "migrations\/delete.md", @@ -24045,7 +24061,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 149, + "weight": 139, "cookies": false, "type": "", "demo": "project\/get-usage.md", @@ -24133,7 +24149,7 @@ "x-appwrite": { "method": "listVariables", "group": null, - "weight": 151, + "weight": 141, "cookies": false, "type": "", "demo": "project\/list-variables.md", @@ -24179,7 +24195,7 @@ "x-appwrite": { "method": "createVariable", "group": null, - "weight": 150, + "weight": 140, "cookies": false, "type": "", "demo": "project\/create-variable.md", @@ -24257,7 +24273,7 @@ "x-appwrite": { "method": "getVariable", "group": null, - "weight": 152, + "weight": 142, "cookies": false, "type": "", "demo": "project\/get-variable.md", @@ -24315,7 +24331,7 @@ "x-appwrite": { "method": "updateVariable", "group": null, - "weight": 153, + "weight": 143, "cookies": false, "type": "", "demo": "project\/update-variable.md", @@ -24397,7 +24413,7 @@ "x-appwrite": { "method": "deleteVariable", "group": null, - "weight": 154, + "weight": 144, "cookies": false, "type": "", "demo": "project\/delete-variable.md", @@ -24540,7 +24556,7 @@ "x-appwrite": { "method": "create", "group": "projects", - "weight": 103, + "weight": 93, "cookies": false, "type": "", "demo": "projects\/create.md", @@ -24674,7 +24690,7 @@ "x-appwrite": { "method": "get", "group": "projects", - "weight": 104, + "weight": 94, "cookies": false, "type": "", "demo": "projects\/get.md", @@ -24732,7 +24748,7 @@ "x-appwrite": { "method": "update", "group": "projects", - "weight": 105, + "weight": 95, "cookies": false, "type": "", "demo": "projects\/update.md", @@ -24847,7 +24863,7 @@ "x-appwrite": { "method": "delete", "group": "projects", - "weight": 122, + "weight": 112, "cookies": false, "type": "", "demo": "projects\/delete.md", @@ -24907,7 +24923,7 @@ "x-appwrite": { "method": "updateApiStatus", "group": "projects", - "weight": 109, + "weight": 99, "cookies": false, "type": "", "demo": "projects\/update-api-status.md", @@ -25061,7 +25077,7 @@ "x-appwrite": { "method": "updateApiStatusAll", "group": "projects", - "weight": 110, + "weight": 100, "cookies": false, "type": "", "demo": "projects\/update-api-status-all.md", @@ -25198,7 +25214,7 @@ "x-appwrite": { "method": "updateAuthDuration", "group": "auth", - "weight": 115, + "weight": 105, "cookies": false, "type": "", "demo": "projects\/update-auth-duration.md", @@ -25277,7 +25293,7 @@ "x-appwrite": { "method": "updateAuthLimit", "group": "auth", - "weight": 114, + "weight": 104, "cookies": false, "type": "", "demo": "projects\/update-auth-limit.md", @@ -25356,7 +25372,7 @@ "x-appwrite": { "method": "updateAuthSessionsLimit", "group": "auth", - "weight": 120, + "weight": 110, "cookies": false, "type": "", "demo": "projects\/update-auth-sessions-limit.md", @@ -25435,7 +25451,7 @@ "x-appwrite": { "method": "updateMembershipsPrivacy", "group": "auth", - "weight": 113, + "weight": 103, "cookies": false, "type": "", "demo": "projects\/update-memberships-privacy.md", @@ -25526,7 +25542,7 @@ "x-appwrite": { "method": "updateMockNumbers", "group": "auth", - "weight": 121, + "weight": 111, "cookies": false, "type": "", "demo": "projects\/update-mock-numbers.md", @@ -25608,7 +25624,7 @@ "x-appwrite": { "method": "updateAuthPasswordDictionary", "group": "auth", - "weight": 118, + "weight": 108, "cookies": false, "type": "", "demo": "projects\/update-auth-password-dictionary.md", @@ -25687,7 +25703,7 @@ "x-appwrite": { "method": "updateAuthPasswordHistory", "group": "auth", - "weight": 117, + "weight": 107, "cookies": false, "type": "", "demo": "projects\/update-auth-password-history.md", @@ -25766,7 +25782,7 @@ "x-appwrite": { "method": "updatePersonalDataCheck", "group": "auth", - "weight": 119, + "weight": 109, "cookies": false, "type": "", "demo": "projects\/update-personal-data-check.md", @@ -25845,7 +25861,7 @@ "x-appwrite": { "method": "updateSessionAlerts", "group": "auth", - "weight": 112, + "weight": 102, "cookies": false, "type": "", "demo": "projects\/update-session-alerts.md", @@ -25924,7 +25940,7 @@ "x-appwrite": { "method": "updateSessionInvalidation", "group": "auth", - "weight": 148, + "weight": 138, "cookies": false, "type": "", "demo": "projects\/update-session-invalidation.md", @@ -26003,7 +26019,7 @@ "x-appwrite": { "method": "updateAuthStatus", "group": "auth", - "weight": 116, + "weight": 106, "cookies": false, "type": "", "demo": "projects\/update-auth-status.md", @@ -26483,7 +26499,7 @@ "x-appwrite": { "method": "createJWT", "group": "auth", - "weight": 134, + "weight": 124, "cookies": false, "type": "", "demo": "projects\/create-jwt.md", @@ -26570,7 +26586,7 @@ "x-appwrite": { "method": "listKeys", "group": "keys", - "weight": 130, + "weight": 120, "cookies": false, "type": "", "demo": "projects\/list-keys.md", @@ -26639,7 +26655,7 @@ "x-appwrite": { "method": "createKey", "group": "keys", - "weight": 129, + "weight": 119, "cookies": false, "type": "", "demo": "projects\/create-key.md", @@ -26734,7 +26750,7 @@ "x-appwrite": { "method": "getKey", "group": "keys", - "weight": 131, + "weight": 121, "cookies": false, "type": "", "demo": "projects\/get-key.md", @@ -26802,7 +26818,7 @@ "x-appwrite": { "method": "updateKey", "group": "keys", - "weight": 132, + "weight": 122, "cookies": false, "type": "", "demo": "projects\/update-key.md", @@ -26898,7 +26914,7 @@ "x-appwrite": { "method": "deleteKey", "group": "keys", - "weight": 133, + "weight": 123, "cookies": false, "type": "", "demo": "projects\/delete-key.md", @@ -26968,7 +26984,7 @@ "x-appwrite": { "method": "updateOAuth2", "group": "auth", - "weight": 111, + "weight": 101, "cookies": false, "type": "", "demo": "projects\/update-o-auth-2.md", @@ -27109,7 +27125,7 @@ "x-appwrite": { "method": "listPlatforms", "group": "platforms", - "weight": 136, + "weight": 126, "cookies": false, "type": "", "demo": "projects\/list-platforms.md", @@ -27178,7 +27194,7 @@ "x-appwrite": { "method": "createPlatform", "group": "platforms", - "weight": 135, + "weight": 125, "cookies": false, "type": "", "demo": "projects\/create-platform.md", @@ -27297,7 +27313,7 @@ "x-appwrite": { "method": "getPlatform", "group": "platforms", - "weight": 137, + "weight": 127, "cookies": false, "type": "", "demo": "projects\/get-platform.md", @@ -27365,7 +27381,7 @@ "x-appwrite": { "method": "updatePlatform", "group": "platforms", - "weight": 138, + "weight": 128, "cookies": false, "type": "", "demo": "projects\/update-platform.md", @@ -27460,7 +27476,7 @@ "x-appwrite": { "method": "deletePlatform", "group": "platforms", - "weight": 139, + "weight": 129, "cookies": false, "type": "", "demo": "projects\/delete-platform.md", @@ -27530,7 +27546,7 @@ "x-appwrite": { "method": "updateServiceStatus", "group": "projects", - "weight": 107, + "weight": 97, "cookies": false, "type": "", "demo": "projects\/update-service-status.md", @@ -27632,7 +27648,7 @@ "x-appwrite": { "method": "updateServiceStatusAll", "group": "projects", - "weight": 108, + "weight": 98, "cookies": false, "type": "", "demo": "projects\/update-service-status-all.md", @@ -27711,7 +27727,7 @@ "x-appwrite": { "method": "updateSmtp", "group": "templates", - "weight": 140, + "weight": 130, "cookies": false, "type": "", "demo": "projects\/update-smtp.md", @@ -27903,7 +27919,7 @@ "x-appwrite": { "method": "createSmtpTest", "group": "templates", - "weight": 141, + "weight": 131, "cookies": false, "type": "", "demo": "projects\/create-smtp-test.md", @@ -28112,7 +28128,7 @@ "x-appwrite": { "method": "updateTeam", "group": "projects", - "weight": 106, + "weight": 96, "cookies": false, "type": "", "demo": "projects\/update-team.md", @@ -28191,7 +28207,7 @@ "x-appwrite": { "method": "getEmailTemplate", "group": "templates", - "weight": 143, + "weight": 133, "cookies": false, "type": "", "demo": "projects\/get-email-template.md", @@ -28415,7 +28431,7 @@ "x-appwrite": { "method": "updateEmailTemplate", "group": "templates", - "weight": 145, + "weight": 135, "cookies": false, "type": "", "demo": "projects\/update-email-template.md", @@ -28679,7 +28695,7 @@ "x-appwrite": { "method": "deleteEmailTemplate", "group": "templates", - "weight": 147, + "weight": 137, "cookies": false, "type": "", "demo": "projects\/delete-email-template.md", @@ -28905,7 +28921,7 @@ "x-appwrite": { "method": "getSmsTemplate", "group": "templates", - "weight": 142, + "weight": 132, "cookies": false, "type": "", "demo": "projects\/get-sms-template.md", @@ -29188,7 +29204,7 @@ "x-appwrite": { "method": "updateSmsTemplate", "group": "templates", - "weight": 144, + "weight": 134, "cookies": false, "type": "", "demo": "projects\/update-sms-template.md", @@ -29494,7 +29510,7 @@ "x-appwrite": { "method": "deleteSmsTemplate", "group": "templates", - "weight": 146, + "weight": 136, "cookies": false, "type": "", "demo": "projects\/delete-sms-template.md", @@ -29779,7 +29795,7 @@ "x-appwrite": { "method": "listWebhooks", "group": "webhooks", - "weight": 124, + "weight": 114, "cookies": false, "type": "", "demo": "projects\/list-webhooks.md", @@ -29848,7 +29864,7 @@ "x-appwrite": { "method": "createWebhook", "group": "webhooks", - "weight": 123, + "weight": 113, "cookies": false, "type": "", "demo": "projects\/create-webhook.md", @@ -29963,7 +29979,7 @@ "x-appwrite": { "method": "getWebhook", "group": "webhooks", - "weight": 125, + "weight": 115, "cookies": false, "type": "", "demo": "projects\/get-webhook.md", @@ -30031,7 +30047,7 @@ "x-appwrite": { "method": "updateWebhook", "group": "webhooks", - "weight": 126, + "weight": 116, "cookies": false, "type": "", "demo": "projects\/update-webhook.md", @@ -30147,7 +30163,7 @@ "x-appwrite": { "method": "deleteWebhook", "group": "webhooks", - "weight": 128, + "weight": 118, "cookies": false, "type": "", "demo": "projects\/delete-webhook.md", @@ -30217,7 +30233,7 @@ "x-appwrite": { "method": "updateWebhookSignature", "group": "webhooks", - "weight": 127, + "weight": 117, "cookies": false, "type": "", "demo": "projects\/update-webhook-signature.md", @@ -33456,7 +33472,7 @@ "x-appwrite": { "method": "listBuckets", "group": "buckets", - "weight": 156, + "weight": 146, "cookies": false, "type": "", "demo": "storage\/list-buckets.md", @@ -33540,7 +33556,7 @@ "x-appwrite": { "method": "createBucket", "group": "buckets", - "weight": 155, + "weight": 145, "cookies": false, "type": "", "demo": "storage\/create-bucket.md", @@ -33673,7 +33689,7 @@ "x-appwrite": { "method": "getBucket", "group": "buckets", - "weight": 157, + "weight": 147, "cookies": false, "type": "", "demo": "storage\/get-bucket.md", @@ -33732,7 +33748,7 @@ "x-appwrite": { "method": "updateBucket", "group": "buckets", - "weight": 158, + "weight": 148, "cookies": false, "type": "", "demo": "storage\/update-bucket.md", @@ -33862,7 +33878,7 @@ "x-appwrite": { "method": "deleteBucket", "group": "buckets", - "weight": 159, + "weight": 149, "cookies": false, "type": "", "demo": "storage\/delete-bucket.md", @@ -33923,7 +33939,7 @@ "x-appwrite": { "method": "listFiles", "group": "files", - "weight": 161, + "weight": 151, "cookies": false, "type": "", "demo": "storage\/list-files.md", @@ -34020,7 +34036,7 @@ "x-appwrite": { "method": "createFile", "group": "files", - "weight": 160, + "weight": 150, "cookies": false, "type": "upload", "demo": "storage\/create-file.md", @@ -34119,7 +34135,7 @@ "x-appwrite": { "method": "getFile", "group": "files", - "weight": 162, + "weight": 152, "cookies": false, "type": "", "demo": "storage\/get-file.md", @@ -34191,7 +34207,7 @@ "x-appwrite": { "method": "updateFile", "group": "files", - "weight": 167, + "weight": 157, "cookies": false, "type": "", "demo": "storage\/update-file.md", @@ -34282,7 +34298,7 @@ "x-appwrite": { "method": "deleteFile", "group": "files", - "weight": 168, + "weight": 158, "cookies": false, "type": "", "demo": "storage\/delete-file.md", @@ -34349,7 +34365,7 @@ "x-appwrite": { "method": "getFileDownload", "group": "files", - "weight": 164, + "weight": 154, "cookies": false, "type": "location", "demo": "storage\/get-file-download.md", @@ -34427,7 +34443,7 @@ "x-appwrite": { "method": "getFilePreview", "group": "files", - "weight": 163, + "weight": 153, "cookies": false, "type": "location", "demo": "storage\/get-file-preview.md", @@ -34655,7 +34671,7 @@ "x-appwrite": { "method": "getFileView", "group": "files", - "weight": 165, + "weight": 155, "cookies": false, "type": "location", "demo": "storage\/get-file-view.md", @@ -34740,7 +34756,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 169, + "weight": 159, "cookies": false, "type": "", "demo": "storage\/get-usage.md", @@ -34812,7 +34828,7 @@ "x-appwrite": { "method": "getBucketUsage", "group": null, - "weight": 170, + "weight": 160, "cookies": false, "type": "", "demo": "storage\/get-bucket-usage.md", @@ -35955,6 +35971,22 @@ "type": "boolean", "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", "x-example": false + }, + "columns": { + "type": "array", + "description": "Array of column definitions to create. Each column should contain: key (string), type (string: string, integer, float, boolean, datetime, relationship), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.", + "x-example": null, + "items": { + "type": "object" + } + }, + "indexes": { + "type": "array", + "description": "Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of column keys), orders (array of ASC\/DESC, optional), and lengths (array of integers, optional).", + "x-example": null, + "items": { + "type": "object" + } } }, "required": [ @@ -41692,7 +41724,7 @@ "x-appwrite": { "method": "list", "group": "teams", - "weight": 172, + "weight": 162, "cookies": false, "type": "", "demo": "teams\/list.md", @@ -41779,7 +41811,7 @@ "x-appwrite": { "method": "create", "group": "teams", - "weight": 171, + "weight": 161, "cookies": false, "type": "", "demo": "teams\/create.md", @@ -41864,7 +41896,7 @@ "x-appwrite": { "method": "get", "group": "teams", - "weight": 173, + "weight": 163, "cookies": false, "type": "", "demo": "teams\/get.md", @@ -41926,7 +41958,7 @@ "x-appwrite": { "method": "updateName", "group": "teams", - "weight": 175, + "weight": 165, "cookies": false, "type": "", "demo": "teams\/update-name.md", @@ -42000,7 +42032,7 @@ "x-appwrite": { "method": "delete", "group": "teams", - "weight": 177, + "weight": 167, "cookies": false, "type": "", "demo": "teams\/delete.md", @@ -42064,7 +42096,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 184, + "weight": 174, "cookies": false, "type": "", "demo": "teams\/list-logs.md", @@ -42148,7 +42180,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 179, + "weight": 169, "cookies": false, "type": "", "demo": "teams\/list-memberships.md", @@ -42245,7 +42277,7 @@ "x-appwrite": { "method": "createMembership", "group": "memberships", - "weight": 178, + "weight": 168, "cookies": false, "type": "", "demo": "teams\/create-membership.md", @@ -42356,7 +42388,7 @@ "x-appwrite": { "method": "getMembership", "group": "memberships", - "weight": 180, + "weight": 170, "cookies": false, "type": "", "demo": "teams\/get-membership.md", @@ -42428,7 +42460,7 @@ "x-appwrite": { "method": "updateMembership", "group": "memberships", - "weight": 181, + "weight": 171, "cookies": false, "type": "", "demo": "teams\/update-membership.md", @@ -42515,7 +42547,7 @@ "x-appwrite": { "method": "deleteMembership", "group": "memberships", - "weight": 183, + "weight": 173, "cookies": false, "type": "", "demo": "teams\/delete-membership.md", @@ -42589,7 +42621,7 @@ "x-appwrite": { "method": "updateMembershipStatus", "group": "memberships", - "weight": 182, + "weight": 172, "cookies": false, "type": "", "demo": "teams\/update-membership-status.md", @@ -42686,7 +42718,7 @@ "x-appwrite": { "method": "getPrefs", "group": "teams", - "weight": 174, + "weight": 164, "cookies": false, "type": "", "demo": "teams\/get-prefs.md", @@ -42746,7 +42778,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "teams", - "weight": 176, + "weight": 166, "cookies": false, "type": "", "demo": "teams\/update-prefs.md", @@ -43202,7 +43234,7 @@ "x-appwrite": { "method": "list", "group": "users", - "weight": 194, + "weight": 184, "cookies": false, "type": "", "demo": "users\/list.md", @@ -43286,7 +43318,7 @@ "x-appwrite": { "method": "create", "group": "users", - "weight": 185, + "weight": 175, "cookies": false, "type": "", "demo": "users\/create.md", @@ -43376,7 +43408,7 @@ "x-appwrite": { "method": "createArgon2User", "group": "users", - "weight": 188, + "weight": 178, "cookies": false, "type": "", "demo": "users\/create-argon-2-user.md", @@ -43461,7 +43493,7 @@ "x-appwrite": { "method": "createBcryptUser", "group": "users", - "weight": 186, + "weight": 176, "cookies": false, "type": "", "demo": "users\/create-bcrypt-user.md", @@ -43546,7 +43578,7 @@ "x-appwrite": { "method": "listIdentities", "group": "identities", - "weight": 202, + "weight": 192, "cookies": false, "type": "", "demo": "users\/list-identities.md", @@ -43625,7 +43657,7 @@ "x-appwrite": { "method": "deleteIdentity", "group": "identities", - "weight": 225, + "weight": 215, "cookies": false, "type": "", "demo": "users\/delete-identity.md", @@ -43686,7 +43718,7 @@ "x-appwrite": { "method": "createMD5User", "group": "users", - "weight": 187, + "weight": 177, "cookies": false, "type": "", "demo": "users\/create-md-5-user.md", @@ -43771,7 +43803,7 @@ "x-appwrite": { "method": "createPHPassUser", "group": "users", - "weight": 190, + "weight": 180, "cookies": false, "type": "", "demo": "users\/create-ph-pass-user.md", @@ -43856,7 +43888,7 @@ "x-appwrite": { "method": "createScryptUser", "group": "users", - "weight": 191, + "weight": 181, "cookies": false, "type": "", "demo": "users\/create-scrypt-user.md", @@ -43971,7 +44003,7 @@ "x-appwrite": { "method": "createScryptModifiedUser", "group": "users", - "weight": 192, + "weight": 182, "cookies": false, "type": "", "demo": "users\/create-scrypt-modified-user.md", @@ -44074,7 +44106,7 @@ "x-appwrite": { "method": "createSHAUser", "group": "users", - "weight": 189, + "weight": 179, "cookies": false, "type": "", "demo": "users\/create-sha-user.md", @@ -44179,7 +44211,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 227, + "weight": 217, "cookies": false, "type": "", "demo": "users\/get-usage.md", @@ -44251,7 +44283,7 @@ "x-appwrite": { "method": "get", "group": "users", - "weight": 195, + "weight": 185, "cookies": false, "type": "", "demo": "users\/get.md", @@ -44303,7 +44335,7 @@ "x-appwrite": { "method": "delete", "group": "users", - "weight": 223, + "weight": 213, "cookies": false, "type": "", "demo": "users\/delete.md", @@ -44364,7 +44396,7 @@ "x-appwrite": { "method": "updateEmail", "group": "users", - "weight": 208, + "weight": 198, "cookies": false, "type": "", "demo": "users\/update-email.md", @@ -44444,7 +44476,7 @@ "x-appwrite": { "method": "createJWT", "group": "sessions", - "weight": 226, + "weight": 216, "cookies": false, "type": "", "demo": "users\/create-jwt.md", @@ -44526,7 +44558,7 @@ "x-appwrite": { "method": "updateLabels", "group": "users", - "weight": 204, + "weight": 194, "cookies": false, "type": "", "demo": "users\/update-labels.md", @@ -44609,7 +44641,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 200, + "weight": 190, "cookies": false, "type": "", "demo": "users\/list-logs.md", @@ -44694,7 +44726,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 199, + "weight": 189, "cookies": false, "type": "", "demo": "users\/list-memberships.md", @@ -44790,7 +44822,7 @@ "x-appwrite": { "method": "updateMfa", "group": "users", - "weight": 213, + "weight": 203, "cookies": false, "type": "", "demo": "users\/update-mfa.md", @@ -44921,7 +44953,7 @@ "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", - "weight": 218, + "weight": 208, "cookies": false, "type": "", "demo": "users\/delete-mfa-authenticator.md", @@ -45053,7 +45085,7 @@ "x-appwrite": { "method": "listMfaFactors", "group": "mfa", - "weight": 214, + "weight": 204, "cookies": false, "type": "", "demo": "users\/list-mfa-factors.md", @@ -45168,7 +45200,7 @@ "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", - "weight": 215, + "weight": 205, "cookies": false, "type": "", "demo": "users\/get-mfa-recovery-codes.md", @@ -45281,7 +45313,7 @@ "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", - "weight": 217, + "weight": 207, "cookies": false, "type": "", "demo": "users\/update-mfa-recovery-codes.md", @@ -45394,7 +45426,7 @@ "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", - "weight": 216, + "weight": 206, "cookies": false, "type": "", "demo": "users\/create-mfa-recovery-codes.md", @@ -45509,7 +45541,7 @@ "x-appwrite": { "method": "updateName", "group": "users", - "weight": 206, + "weight": 196, "cookies": false, "type": "", "demo": "users\/update-name.md", @@ -45589,7 +45621,7 @@ "x-appwrite": { "method": "updatePassword", "group": "users", - "weight": 207, + "weight": 197, "cookies": false, "type": "", "demo": "users\/update-password.md", @@ -45669,7 +45701,7 @@ "x-appwrite": { "method": "updatePhone", "group": "users", - "weight": 209, + "weight": 199, "cookies": false, "type": "", "demo": "users\/update-phone.md", @@ -45749,7 +45781,7 @@ "x-appwrite": { "method": "getPrefs", "group": "users", - "weight": 196, + "weight": 186, "cookies": false, "type": "", "demo": "users\/get-prefs.md", @@ -45808,7 +45840,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "users", - "weight": 211, + "weight": 201, "cookies": false, "type": "", "demo": "users\/update-prefs.md", @@ -45888,7 +45920,7 @@ "x-appwrite": { "method": "listSessions", "group": "sessions", - "weight": 198, + "weight": 188, "cookies": false, "type": "", "demo": "users\/list-sessions.md", @@ -45958,7 +45990,7 @@ "x-appwrite": { "method": "createSession", "group": "sessions", - "weight": 219, + "weight": 209, "cookies": false, "type": "", "demo": "users\/create-session.md", @@ -46010,7 +46042,7 @@ "x-appwrite": { "method": "deleteSessions", "group": "sessions", - "weight": 222, + "weight": 212, "cookies": false, "type": "", "demo": "users\/delete-sessions.md", @@ -46064,7 +46096,7 @@ "x-appwrite": { "method": "deleteSession", "group": "sessions", - "weight": 221, + "weight": 211, "cookies": false, "type": "", "demo": "users\/delete-session.md", @@ -46135,7 +46167,7 @@ "x-appwrite": { "method": "updateStatus", "group": "users", - "weight": 203, + "weight": 193, "cookies": false, "type": "", "demo": "users\/update-status.md", @@ -46215,7 +46247,7 @@ "x-appwrite": { "method": "listTargets", "group": "targets", - "weight": 201, + "weight": 191, "cookies": false, "type": "", "demo": "users\/list-targets.md", @@ -46299,7 +46331,7 @@ "x-appwrite": { "method": "createTarget", "group": "targets", - "weight": 193, + "weight": 183, "cookies": false, "type": "", "demo": "users\/create-target.md", @@ -46409,7 +46441,7 @@ "x-appwrite": { "method": "getTarget", "group": "targets", - "weight": 197, + "weight": 187, "cookies": false, "type": "", "demo": "users\/get-target.md", @@ -46479,7 +46511,7 @@ "x-appwrite": { "method": "updateTarget", "group": "targets", - "weight": 212, + "weight": 202, "cookies": false, "type": "", "demo": "users\/update-target.md", @@ -46568,7 +46600,7 @@ "x-appwrite": { "method": "deleteTarget", "group": "targets", - "weight": 224, + "weight": 214, "cookies": false, "type": "", "demo": "users\/delete-target.md", @@ -46640,7 +46672,7 @@ "x-appwrite": { "method": "createToken", "group": "sessions", - "weight": 220, + "weight": 210, "cookies": false, "type": "", "demo": "users\/create-token.md", @@ -46722,7 +46754,7 @@ "x-appwrite": { "method": "updateEmailVerification", "group": "users", - "weight": 210, + "weight": 200, "cookies": false, "type": "", "demo": "users\/update-email-verification.md", @@ -46802,7 +46834,7 @@ "x-appwrite": { "method": "updatePhoneVerification", "group": "users", - "weight": 205, + "weight": 195, "cookies": false, "type": "", "demo": "users\/update-phone-verification.md", @@ -46882,7 +46914,7 @@ "x-appwrite": { "method": "createRepositoryDetection", "group": "repositories", - "weight": 231, + "weight": 221, "cookies": false, "type": "", "demo": "vcs\/create-repository-detection.md", @@ -46978,7 +47010,7 @@ "x-appwrite": { "method": "listRepositories", "group": "repositories", - "weight": 232, + "weight": 222, "cookies": false, "type": "", "demo": "vcs\/list-repositories.md", @@ -47037,6 +47069,19 @@ "default": "" }, "in": "query" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" } ] }, @@ -47063,7 +47108,7 @@ "x-appwrite": { "method": "createRepository", "group": "repositories", - "weight": 233, + "weight": 223, "cookies": false, "type": "", "demo": "vcs\/create-repository.md", @@ -47148,7 +47193,7 @@ "x-appwrite": { "method": "getRepository", "group": "repositories", - "weight": 234, + "weight": 224, "cookies": false, "type": "", "demo": "vcs\/get-repository.md", @@ -47218,7 +47263,7 @@ "x-appwrite": { "method": "listRepositoryBranches", "group": "repositories", - "weight": 235, + "weight": 225, "cookies": false, "type": "", "demo": "vcs\/list-repository-branches.md", @@ -47288,7 +47333,7 @@ "x-appwrite": { "method": "getRepositoryContents", "group": "repositories", - "weight": 230, + "weight": 220, "cookies": false, "type": "", "demo": "vcs\/get-repository-contents.md", @@ -47373,7 +47418,7 @@ "x-appwrite": { "method": "updateExternalDeployments", "group": "repositories", - "weight": 240, + "weight": 230, "cookies": false, "type": "", "demo": "vcs\/update-external-deployments.md", @@ -47462,7 +47507,7 @@ "x-appwrite": { "method": "listInstallations", "group": "installations", - "weight": 237, + "weight": 227, "cookies": false, "type": "", "demo": "vcs\/list-installations.md", @@ -47547,7 +47592,7 @@ "x-appwrite": { "method": "getInstallation", "group": "installations", - "weight": 238, + "weight": 228, "cookies": false, "type": "", "demo": "vcs\/get-installation.md", @@ -47598,7 +47643,7 @@ "x-appwrite": { "method": "deleteInstallation", "group": "installations", - "weight": 239, + "weight": 229, "cookies": false, "type": "", "demo": "vcs\/delete-installation.md", diff --git a/app/config/specs/open-api3-latest-server.json b/app/config/specs/open-api3-latest-server.json index a2a97c046e..3a87dc33de 100644 --- a/app/config/specs/open-api3-latest-server.json +++ b/app/config/specs/open-api3-latest-server.json @@ -260,7 +260,7 @@ "x-appwrite": { "method": "listIdentities", "group": "identities", - "weight": 58, + "weight": 48, "cookies": false, "type": "", "demo": "account\/list-identities.md", @@ -331,7 +331,7 @@ "x-appwrite": { "method": "deleteIdentity", "group": "identities", - "weight": 59, + "weight": 49, "cookies": false, "type": "", "demo": "account\/delete-identity.md", @@ -522,7 +522,7 @@ "x-appwrite": { "method": "updateMFA", "group": "mfa", - "weight": 45, + "weight": 306, "cookies": false, "type": "", "demo": "account\/update-mfa.md", @@ -593,7 +593,7 @@ "x-appwrite": { "method": "createMfaAuthenticator", "group": "mfa", - "weight": 47, + "weight": 308, "cookies": false, "type": "", "demo": "account\/create-mfa-authenticator.md", @@ -716,7 +716,7 @@ "x-appwrite": { "method": "updateMfaAuthenticator", "group": "mfa", - "weight": 48, + "weight": 309, "cookies": false, "type": "", "demo": "account\/update-mfa-authenticator.md", @@ -855,7 +855,7 @@ "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", - "weight": 52, + "weight": 310, "cookies": false, "type": "", "demo": "account\/delete-mfa-authenticator.md", @@ -954,7 +954,7 @@ ] } }, - "\/account\/mfa\/challenge": { + "\/account\/mfa\/challenges": { "post": { "summary": "Create MFA challenge", "operationId": "accountCreateMfaChallenge", @@ -978,7 +978,7 @@ "x-appwrite": { "method": "createMfaChallenge", "group": "mfa", - "weight": 53, + "weight": 314, "cookies": false, "type": "", "demo": "account\/create-mfa-challenge.md", @@ -1106,7 +1106,7 @@ "x-appwrite": { "method": "updateMfaChallenge", "group": "mfa", - "weight": 54, + "weight": 315, "cookies": false, "type": "", "demo": "account\/update-mfa-challenge.md", @@ -1243,7 +1243,7 @@ "x-appwrite": { "method": "listMfaFactors", "group": "mfa", - "weight": 46, + "weight": 307, "cookies": false, "type": "", "demo": "account\/list-mfa-factors.md", @@ -1343,7 +1343,7 @@ "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", - "weight": 51, + "weight": 313, "cookies": false, "type": "", "demo": "account\/get-mfa-recovery-codes.md", @@ -1441,7 +1441,7 @@ "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", - "weight": 49, + "weight": 311, "cookies": false, "type": "", "demo": "account\/create-mfa-recovery-codes.md", @@ -1539,7 +1539,7 @@ "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", - "weight": 50, + "weight": 312, "cookies": false, "type": "", "demo": "account\/update-mfa-recovery-codes.md", @@ -3584,7 +3584,7 @@ "x-appwrite": { "method": "getBrowser", "group": null, - "weight": 61, + "weight": 51, "cookies": false, "type": "location", "demo": "avatars\/get-browser.md", @@ -3712,7 +3712,7 @@ "x-appwrite": { "method": "getCreditCard", "group": null, - "weight": 60, + "weight": 50, "cookies": false, "type": "location", "demo": "avatars\/get-credit-card.md", @@ -3846,7 +3846,7 @@ "x-appwrite": { "method": "getFavicon", "group": null, - "weight": 64, + "weight": 54, "cookies": false, "type": "location", "demo": "avatars\/get-favicon.md", @@ -3906,7 +3906,7 @@ "x-appwrite": { "method": "getFlag", "group": null, - "weight": 62, + "weight": 52, "cookies": false, "type": "location", "demo": "avatars\/get-flag.md", @@ -4396,7 +4396,7 @@ "x-appwrite": { "method": "getImage", "group": null, - "weight": 63, + "weight": 53, "cookies": false, "type": "location", "demo": "avatars\/get-image.md", @@ -4480,7 +4480,7 @@ "x-appwrite": { "method": "getInitials", "group": null, - "weight": 66, + "weight": 56, "cookies": false, "type": "location", "demo": "avatars\/get-initials.md", @@ -4574,7 +4574,7 @@ "x-appwrite": { "method": "getQR", "group": null, - "weight": 65, + "weight": 55, "cookies": false, "type": "location", "demo": "avatars\/get-qr.md", @@ -4668,7 +4668,7 @@ "x-appwrite": { "method": "getScreenshot", "group": null, - "weight": 67, + "weight": 57, "cookies": false, "type": "location", "demo": "avatars\/get-screenshot.md", @@ -6533,6 +6533,22 @@ "type": "boolean", "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", "x-example": false + }, + "attributes": { + "type": "array", + "description": "Array of attribute definitions to create. Each attribute should contain: key (string), type (string: string, integer, float, boolean, datetime, relationship), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.", + "x-example": null, + "items": { + "type": "object" + } + }, + "indexes": { + "type": "array", + "description": "Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of attribute keys), orders (array of ASC\/DESC, optional), and lengths (array of integers, optional).", + "x-example": null, + "items": { + "type": "object" + } } }, "required": [ @@ -14387,7 +14403,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 251, + "weight": 241, "cookies": false, "type": "graphql", "demo": "graphql\/query.md", @@ -14441,7 +14457,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 250, + "weight": 240, "cookies": false, "type": "graphql", "demo": "graphql\/mutation.md", @@ -14495,7 +14511,7 @@ "x-appwrite": { "method": "get", "group": "health", - "weight": 79, + "weight": 69, "cookies": false, "type": "", "demo": "health\/get.md", @@ -14545,7 +14561,7 @@ "x-appwrite": { "method": "getAntivirus", "group": "health", - "weight": 100, + "weight": 90, "cookies": false, "type": "", "demo": "health\/get-antivirus.md", @@ -14595,7 +14611,7 @@ "x-appwrite": { "method": "getCache", "group": "health", - "weight": 82, + "weight": 72, "cookies": false, "type": "", "demo": "health\/get-cache.md", @@ -14645,7 +14661,7 @@ "x-appwrite": { "method": "getCertificate", "group": "health", - "weight": 87, + "weight": 77, "cookies": false, "type": "", "demo": "health\/get-certificate.md", @@ -14706,7 +14722,7 @@ "x-appwrite": { "method": "getDB", "group": "health", - "weight": 81, + "weight": 71, "cookies": false, "type": "", "demo": "health\/get-db.md", @@ -14756,7 +14772,7 @@ "x-appwrite": { "method": "getPubSub", "group": "health", - "weight": 83, + "weight": 73, "cookies": false, "type": "", "demo": "health\/get-pub-sub.md", @@ -14806,7 +14822,7 @@ "x-appwrite": { "method": "getQueueBuilds", "group": "queue", - "weight": 89, + "weight": 79, "cookies": false, "type": "", "demo": "health\/get-queue-builds.md", @@ -14869,7 +14885,7 @@ "x-appwrite": { "method": "getQueueCertificates", "group": "queue", - "weight": 88, + "weight": 78, "cookies": false, "type": "", "demo": "health\/get-queue-certificates.md", @@ -14932,7 +14948,7 @@ "x-appwrite": { "method": "getQueueDatabases", "group": "queue", - "weight": 90, + "weight": 80, "cookies": false, "type": "", "demo": "health\/get-queue-databases.md", @@ -15006,7 +15022,7 @@ "x-appwrite": { "method": "getQueueDeletes", "group": "queue", - "weight": 91, + "weight": 81, "cookies": false, "type": "", "demo": "health\/get-queue-deletes.md", @@ -15069,7 +15085,7 @@ "x-appwrite": { "method": "getFailedJobs", "group": "queue", - "weight": 101, + "weight": 91, "cookies": false, "type": "", "demo": "health\/get-failed-jobs.md", @@ -15158,7 +15174,7 @@ "x-appwrite": { "method": "getQueueFunctions", "group": "queue", - "weight": 95, + "weight": 85, "cookies": false, "type": "", "demo": "health\/get-queue-functions.md", @@ -15221,7 +15237,7 @@ "x-appwrite": { "method": "getQueueLogs", "group": "queue", - "weight": 86, + "weight": 76, "cookies": false, "type": "", "demo": "health\/get-queue-logs.md", @@ -15284,7 +15300,7 @@ "x-appwrite": { "method": "getQueueMails", "group": "queue", - "weight": 92, + "weight": 82, "cookies": false, "type": "", "demo": "health\/get-queue-mails.md", @@ -15347,7 +15363,7 @@ "x-appwrite": { "method": "getQueueMessaging", "group": "queue", - "weight": 93, + "weight": 83, "cookies": false, "type": "", "demo": "health\/get-queue-messaging.md", @@ -15410,7 +15426,7 @@ "x-appwrite": { "method": "getQueueMigrations", "group": "queue", - "weight": 94, + "weight": 84, "cookies": false, "type": "", "demo": "health\/get-queue-migrations.md", @@ -15473,7 +15489,7 @@ "x-appwrite": { "method": "getQueueStatsResources", "group": "queue", - "weight": 96, + "weight": 86, "cookies": false, "type": "", "demo": "health\/get-queue-stats-resources.md", @@ -15536,7 +15552,7 @@ "x-appwrite": { "method": "getQueueUsage", "group": "queue", - "weight": 97, + "weight": 87, "cookies": false, "type": "", "demo": "health\/get-queue-usage.md", @@ -15599,7 +15615,7 @@ "x-appwrite": { "method": "getQueueWebhooks", "group": "queue", - "weight": 85, + "weight": 75, "cookies": false, "type": "", "demo": "health\/get-queue-webhooks.md", @@ -15662,7 +15678,7 @@ "x-appwrite": { "method": "getStorage", "group": "storage", - "weight": 99, + "weight": 89, "cookies": false, "type": "", "demo": "health\/get-storage.md", @@ -15712,7 +15728,7 @@ "x-appwrite": { "method": "getStorageLocal", "group": "storage", - "weight": 98, + "weight": 88, "cookies": false, "type": "", "demo": "health\/get-storage-local.md", @@ -15762,7 +15778,7 @@ "x-appwrite": { "method": "getTime", "group": "health", - "weight": 84, + "weight": 74, "cookies": false, "type": "", "demo": "health\/get-time.md", @@ -15812,7 +15828,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 71, + "weight": 61, "cookies": false, "type": "", "demo": "locale\/get.md", @@ -15866,7 +15882,7 @@ "x-appwrite": { "method": "listCodes", "group": null, - "weight": 72, + "weight": 62, "cookies": false, "type": "", "demo": "locale\/list-codes.md", @@ -15920,7 +15936,7 @@ "x-appwrite": { "method": "listContinents", "group": null, - "weight": 76, + "weight": 66, "cookies": false, "type": "", "demo": "locale\/list-continents.md", @@ -15974,7 +15990,7 @@ "x-appwrite": { "method": "listCountries", "group": null, - "weight": 73, + "weight": 63, "cookies": false, "type": "", "demo": "locale\/list-countries.md", @@ -16028,7 +16044,7 @@ "x-appwrite": { "method": "listCountriesEU", "group": null, - "weight": 74, + "weight": 64, "cookies": false, "type": "", "demo": "locale\/list-countries-eu.md", @@ -16082,7 +16098,7 @@ "x-appwrite": { "method": "listCountriesPhones", "group": null, - "weight": 75, + "weight": 65, "cookies": false, "type": "", "demo": "locale\/list-countries-phones.md", @@ -16136,7 +16152,7 @@ "x-appwrite": { "method": "listCurrencies", "group": null, - "weight": 77, + "weight": 67, "cookies": false, "type": "", "demo": "locale\/list-currencies.md", @@ -16190,7 +16206,7 @@ "x-appwrite": { "method": "listLanguages", "group": null, - "weight": 78, + "weight": 68, "cookies": false, "type": "", "demo": "locale\/list-languages.md", @@ -16244,7 +16260,7 @@ "x-appwrite": { "method": "listMessages", "group": "messages", - "weight": 308, + "weight": 298, "cookies": false, "type": "", "demo": "messaging\/list-messages.md", @@ -16332,7 +16348,7 @@ "x-appwrite": { "method": "createEmail", "group": "messages", - "weight": 305, + "weight": 295, "cookies": false, "type": "", "demo": "messaging\/create-email.md", @@ -16478,7 +16494,7 @@ "x-appwrite": { "method": "updateEmail", "group": "messages", - "weight": 312, + "weight": 302, "cookies": false, "type": "", "demo": "messaging\/update-email.md", @@ -16636,7 +16652,7 @@ "x-appwrite": { "method": "createPush", "group": "messages", - "weight": 307, + "weight": 297, "cookies": false, "type": "", "demo": "messaging\/create-push.md", @@ -16813,7 +16829,7 @@ "x-appwrite": { "method": "updatePush", "group": "messages", - "weight": 314, + "weight": 304, "cookies": false, "type": "", "demo": "messaging\/update-push.md", @@ -17010,7 +17026,7 @@ "x-appwrite": { "method": "createSms", "group": "messages", - "weight": 306, + "weight": 296, "cookies": false, "type": "", "demo": "messaging\/create-sms.md", @@ -17191,7 +17207,7 @@ "x-appwrite": { "method": "updateSms", "group": "messages", - "weight": 313, + "weight": 303, "cookies": false, "type": "", "demo": "messaging\/update-sms.md", @@ -17378,7 +17394,7 @@ "x-appwrite": { "method": "getMessage", "group": "messages", - "weight": 311, + "weight": 301, "cookies": false, "type": "", "demo": "messaging\/get-message.md", @@ -17432,7 +17448,7 @@ "x-appwrite": { "method": "delete", "group": "messages", - "weight": 315, + "weight": 305, "cookies": false, "type": "", "demo": "messaging\/delete.md", @@ -17495,7 +17511,7 @@ "x-appwrite": { "method": "listMessageLogs", "group": "logs", - "weight": 309, + "weight": 299, "cookies": false, "type": "", "demo": "messaging\/list-message-logs.md", @@ -17582,7 +17598,7 @@ "x-appwrite": { "method": "listTargets", "group": "messages", - "weight": 310, + "weight": 300, "cookies": false, "type": "", "demo": "messaging\/list-targets.md", @@ -17669,7 +17685,7 @@ "x-appwrite": { "method": "listProviders", "group": "providers", - "weight": 279, + "weight": 269, "cookies": false, "type": "", "demo": "messaging\/list-providers.md", @@ -17757,7 +17773,7 @@ "x-appwrite": { "method": "createApnsProvider", "group": "providers", - "weight": 278, + "weight": 268, "cookies": false, "type": "", "demo": "messaging\/create-apns-provider.md", @@ -17936,7 +17952,7 @@ "x-appwrite": { "method": "updateApnsProvider", "group": "providers", - "weight": 292, + "weight": 282, "cookies": false, "type": "", "demo": "messaging\/update-apns-provider.md", @@ -18117,7 +18133,7 @@ "x-appwrite": { "method": "createFcmProvider", "group": "providers", - "weight": 277, + "weight": 267, "cookies": false, "type": "", "demo": "messaging\/create-fcm-provider.md", @@ -18269,7 +18285,7 @@ "x-appwrite": { "method": "updateFcmProvider", "group": "providers", - "weight": 291, + "weight": 281, "cookies": false, "type": "", "demo": "messaging\/update-fcm-provider.md", @@ -18422,7 +18438,7 @@ "x-appwrite": { "method": "createMailgunProvider", "group": "providers", - "weight": 268, + "weight": 258, "cookies": false, "type": "", "demo": "messaging\/create-mailgun-provider.md", @@ -18540,7 +18556,7 @@ "x-appwrite": { "method": "updateMailgunProvider", "group": "providers", - "weight": 282, + "weight": 272, "cookies": false, "type": "", "demo": "messaging\/update-mailgun-provider.md", @@ -18661,7 +18677,7 @@ "x-appwrite": { "method": "createMsg91Provider", "group": "providers", - "weight": 272, + "weight": 262, "cookies": false, "type": "", "demo": "messaging\/create-msg-91-provider.md", @@ -18758,7 +18774,7 @@ "x-appwrite": { "method": "updateMsg91Provider", "group": "providers", - "weight": 286, + "weight": 276, "cookies": false, "type": "", "demo": "messaging\/update-msg-91-provider.md", @@ -18858,7 +18874,7 @@ "x-appwrite": { "method": "createResendProvider", "group": "providers", - "weight": 270, + "weight": 260, "cookies": false, "type": "", "demo": "messaging\/create-resend-provider.md", @@ -18965,7 +18981,7 @@ "x-appwrite": { "method": "updateResendProvider", "group": "providers", - "weight": 284, + "weight": 274, "cookies": false, "type": "", "demo": "messaging\/update-resend-provider.md", @@ -19075,7 +19091,7 @@ "x-appwrite": { "method": "createSendgridProvider", "group": "providers", - "weight": 269, + "weight": 259, "cookies": false, "type": "", "demo": "messaging\/create-sendgrid-provider.md", @@ -19182,7 +19198,7 @@ "x-appwrite": { "method": "updateSendgridProvider", "group": "providers", - "weight": 283, + "weight": 273, "cookies": false, "type": "", "demo": "messaging\/update-sendgrid-provider.md", @@ -19292,7 +19308,7 @@ "x-appwrite": { "method": "createSmtpProvider", "group": "providers", - "weight": 271, + "weight": 261, "cookies": false, "type": "", "demo": "messaging\/create-smtp-provider.md", @@ -19523,7 +19539,7 @@ "x-appwrite": { "method": "updateSmtpProvider", "group": "providers", - "weight": 285, + "weight": 275, "cookies": false, "type": "", "demo": "messaging\/update-smtp-provider.md", @@ -19754,7 +19770,7 @@ "x-appwrite": { "method": "createTelesignProvider", "group": "providers", - "weight": 273, + "weight": 263, "cookies": false, "type": "", "demo": "messaging\/create-telesign-provider.md", @@ -19851,7 +19867,7 @@ "x-appwrite": { "method": "updateTelesignProvider", "group": "providers", - "weight": 287, + "weight": 277, "cookies": false, "type": "", "demo": "messaging\/update-telesign-provider.md", @@ -19951,7 +19967,7 @@ "x-appwrite": { "method": "createTextmagicProvider", "group": "providers", - "weight": 274, + "weight": 264, "cookies": false, "type": "", "demo": "messaging\/create-textmagic-provider.md", @@ -20048,7 +20064,7 @@ "x-appwrite": { "method": "updateTextmagicProvider", "group": "providers", - "weight": 288, + "weight": 278, "cookies": false, "type": "", "demo": "messaging\/update-textmagic-provider.md", @@ -20148,7 +20164,7 @@ "x-appwrite": { "method": "createTwilioProvider", "group": "providers", - "weight": 275, + "weight": 265, "cookies": false, "type": "", "demo": "messaging\/create-twilio-provider.md", @@ -20245,7 +20261,7 @@ "x-appwrite": { "method": "updateTwilioProvider", "group": "providers", - "weight": 289, + "weight": 279, "cookies": false, "type": "", "demo": "messaging\/update-twilio-provider.md", @@ -20345,7 +20361,7 @@ "x-appwrite": { "method": "createVonageProvider", "group": "providers", - "weight": 276, + "weight": 266, "cookies": false, "type": "", "demo": "messaging\/create-vonage-provider.md", @@ -20442,7 +20458,7 @@ "x-appwrite": { "method": "updateVonageProvider", "group": "providers", - "weight": 290, + "weight": 280, "cookies": false, "type": "", "demo": "messaging\/update-vonage-provider.md", @@ -20542,7 +20558,7 @@ "x-appwrite": { "method": "getProvider", "group": "providers", - "weight": 281, + "weight": 271, "cookies": false, "type": "", "demo": "messaging\/get-provider.md", @@ -20596,7 +20612,7 @@ "x-appwrite": { "method": "deleteProvider", "group": "providers", - "weight": 293, + "weight": 283, "cookies": false, "type": "", "demo": "messaging\/delete-provider.md", @@ -20659,7 +20675,7 @@ "x-appwrite": { "method": "listProviderLogs", "group": "providers", - "weight": 280, + "weight": 270, "cookies": false, "type": "", "demo": "messaging\/list-provider-logs.md", @@ -20746,7 +20762,7 @@ "x-appwrite": { "method": "listSubscriberLogs", "group": "subscribers", - "weight": 302, + "weight": 292, "cookies": false, "type": "", "demo": "messaging\/list-subscriber-logs.md", @@ -20833,7 +20849,7 @@ "x-appwrite": { "method": "listTopics", "group": "topics", - "weight": 295, + "weight": 285, "cookies": false, "type": "", "demo": "messaging\/list-topics.md", @@ -20919,7 +20935,7 @@ "x-appwrite": { "method": "createTopic", "group": "topics", - "weight": 294, + "weight": 284, "cookies": false, "type": "", "demo": "messaging\/create-topic.md", @@ -21003,7 +21019,7 @@ "x-appwrite": { "method": "getTopic", "group": "topics", - "weight": 297, + "weight": 287, "cookies": false, "type": "", "demo": "messaging\/get-topic.md", @@ -21064,7 +21080,7 @@ "x-appwrite": { "method": "updateTopic", "group": "topics", - "weight": 298, + "weight": 288, "cookies": false, "type": "", "demo": "messaging\/update-topic.md", @@ -21144,7 +21160,7 @@ "x-appwrite": { "method": "deleteTopic", "group": "topics", - "weight": 299, + "weight": 289, "cookies": false, "type": "", "demo": "messaging\/delete-topic.md", @@ -21207,7 +21223,7 @@ "x-appwrite": { "method": "listTopicLogs", "group": "topics", - "weight": 296, + "weight": 286, "cookies": false, "type": "", "demo": "messaging\/list-topic-logs.md", @@ -21294,7 +21310,7 @@ "x-appwrite": { "method": "listSubscribers", "group": "subscribers", - "weight": 301, + "weight": 291, "cookies": false, "type": "", "demo": "messaging\/list-subscribers.md", @@ -21390,7 +21406,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 300, + "weight": 290, "cookies": false, "type": "", "demo": "messaging\/create-subscriber.md", @@ -21482,7 +21498,7 @@ "x-appwrite": { "method": "getSubscriber", "group": "subscribers", - "weight": 303, + "weight": 293, "cookies": false, "type": "", "demo": "messaging\/get-subscriber.md", @@ -21546,7 +21562,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 304, + "weight": 294, "cookies": false, "type": "", "demo": "messaging\/delete-subscriber.md", @@ -23911,7 +23927,7 @@ "x-appwrite": { "method": "listBuckets", "group": "buckets", - "weight": 156, + "weight": 146, "cookies": false, "type": "", "demo": "storage\/list-buckets.md", @@ -23996,7 +24012,7 @@ "x-appwrite": { "method": "createBucket", "group": "buckets", - "weight": 155, + "weight": 145, "cookies": false, "type": "", "demo": "storage\/create-bucket.md", @@ -24130,7 +24146,7 @@ "x-appwrite": { "method": "getBucket", "group": "buckets", - "weight": 157, + "weight": 147, "cookies": false, "type": "", "demo": "storage\/get-bucket.md", @@ -24190,7 +24206,7 @@ "x-appwrite": { "method": "updateBucket", "group": "buckets", - "weight": 158, + "weight": 148, "cookies": false, "type": "", "demo": "storage\/update-bucket.md", @@ -24321,7 +24337,7 @@ "x-appwrite": { "method": "deleteBucket", "group": "buckets", - "weight": 159, + "weight": 149, "cookies": false, "type": "", "demo": "storage\/delete-bucket.md", @@ -24383,7 +24399,7 @@ "x-appwrite": { "method": "listFiles", "group": "files", - "weight": 161, + "weight": 151, "cookies": false, "type": "", "demo": "storage\/list-files.md", @@ -24482,7 +24498,7 @@ "x-appwrite": { "method": "createFile", "group": "files", - "weight": 160, + "weight": 150, "cookies": false, "type": "upload", "demo": "storage\/create-file.md", @@ -24583,7 +24599,7 @@ "x-appwrite": { "method": "getFile", "group": "files", - "weight": 162, + "weight": 152, "cookies": false, "type": "", "demo": "storage\/get-file.md", @@ -24657,7 +24673,7 @@ "x-appwrite": { "method": "updateFile", "group": "files", - "weight": 167, + "weight": 157, "cookies": false, "type": "", "demo": "storage\/update-file.md", @@ -24750,7 +24766,7 @@ "x-appwrite": { "method": "deleteFile", "group": "files", - "weight": 168, + "weight": 158, "cookies": false, "type": "", "demo": "storage\/delete-file.md", @@ -24819,7 +24835,7 @@ "x-appwrite": { "method": "getFileDownload", "group": "files", - "weight": 164, + "weight": 154, "cookies": false, "type": "location", "demo": "storage\/get-file-download.md", @@ -24899,7 +24915,7 @@ "x-appwrite": { "method": "getFilePreview", "group": "files", - "weight": 163, + "weight": 153, "cookies": false, "type": "location", "demo": "storage\/get-file-preview.md", @@ -25129,7 +25145,7 @@ "x-appwrite": { "method": "getFileView", "group": "files", - "weight": 165, + "weight": 155, "cookies": false, "type": "location", "demo": "storage\/get-file-view.md", @@ -26199,6 +26215,22 @@ "type": "boolean", "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", "x-example": false + }, + "columns": { + "type": "array", + "description": "Array of column definitions to create. Each column should contain: key (string), type (string: string, integer, float, boolean, datetime, relationship), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.", + "x-example": null, + "items": { + "type": "object" + } + }, + "indexes": { + "type": "array", + "description": "Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of column keys), orders (array of ASC\/DESC, optional), and lengths (array of integers, optional).", + "x-example": null, + "items": { + "type": "object" + } } }, "required": [ @@ -31608,7 +31640,7 @@ "x-appwrite": { "method": "list", "group": "teams", - "weight": 172, + "weight": 162, "cookies": false, "type": "", "demo": "teams\/list.md", @@ -31697,7 +31729,7 @@ "x-appwrite": { "method": "create", "group": "teams", - "weight": 171, + "weight": 161, "cookies": false, "type": "", "demo": "teams\/create.md", @@ -31784,7 +31816,7 @@ "x-appwrite": { "method": "get", "group": "teams", - "weight": 173, + "weight": 163, "cookies": false, "type": "", "demo": "teams\/get.md", @@ -31848,7 +31880,7 @@ "x-appwrite": { "method": "updateName", "group": "teams", - "weight": 175, + "weight": 165, "cookies": false, "type": "", "demo": "teams\/update-name.md", @@ -31924,7 +31956,7 @@ "x-appwrite": { "method": "delete", "group": "teams", - "weight": 177, + "weight": 167, "cookies": false, "type": "", "demo": "teams\/delete.md", @@ -31990,7 +32022,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 179, + "weight": 169, "cookies": false, "type": "", "demo": "teams\/list-memberships.md", @@ -32089,7 +32121,7 @@ "x-appwrite": { "method": "createMembership", "group": "memberships", - "weight": 178, + "weight": 168, "cookies": false, "type": "", "demo": "teams\/create-membership.md", @@ -32202,7 +32234,7 @@ "x-appwrite": { "method": "getMembership", "group": "memberships", - "weight": 180, + "weight": 170, "cookies": false, "type": "", "demo": "teams\/get-membership.md", @@ -32276,7 +32308,7 @@ "x-appwrite": { "method": "updateMembership", "group": "memberships", - "weight": 181, + "weight": 171, "cookies": false, "type": "", "demo": "teams\/update-membership.md", @@ -32365,7 +32397,7 @@ "x-appwrite": { "method": "deleteMembership", "group": "memberships", - "weight": 183, + "weight": 173, "cookies": false, "type": "", "demo": "teams\/delete-membership.md", @@ -32441,7 +32473,7 @@ "x-appwrite": { "method": "updateMembershipStatus", "group": "memberships", - "weight": 182, + "weight": 172, "cookies": false, "type": "", "demo": "teams\/update-membership-status.md", @@ -32540,7 +32572,7 @@ "x-appwrite": { "method": "getPrefs", "group": "teams", - "weight": 174, + "weight": 164, "cookies": false, "type": "", "demo": "teams\/get-prefs.md", @@ -32602,7 +32634,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "teams", - "weight": 176, + "weight": 166, "cookies": false, "type": "", "demo": "teams\/update-prefs.md", @@ -33065,7 +33097,7 @@ "x-appwrite": { "method": "list", "group": "users", - "weight": 194, + "weight": 184, "cookies": false, "type": "", "demo": "users\/list.md", @@ -33150,7 +33182,7 @@ "x-appwrite": { "method": "create", "group": "users", - "weight": 185, + "weight": 175, "cookies": false, "type": "", "demo": "users\/create.md", @@ -33241,7 +33273,7 @@ "x-appwrite": { "method": "createArgon2User", "group": "users", - "weight": 188, + "weight": 178, "cookies": false, "type": "", "demo": "users\/create-argon-2-user.md", @@ -33327,7 +33359,7 @@ "x-appwrite": { "method": "createBcryptUser", "group": "users", - "weight": 186, + "weight": 176, "cookies": false, "type": "", "demo": "users\/create-bcrypt-user.md", @@ -33413,7 +33445,7 @@ "x-appwrite": { "method": "listIdentities", "group": "identities", - "weight": 202, + "weight": 192, "cookies": false, "type": "", "demo": "users\/list-identities.md", @@ -33493,7 +33525,7 @@ "x-appwrite": { "method": "deleteIdentity", "group": "identities", - "weight": 225, + "weight": 215, "cookies": false, "type": "", "demo": "users\/delete-identity.md", @@ -33555,7 +33587,7 @@ "x-appwrite": { "method": "createMD5User", "group": "users", - "weight": 187, + "weight": 177, "cookies": false, "type": "", "demo": "users\/create-md-5-user.md", @@ -33641,7 +33673,7 @@ "x-appwrite": { "method": "createPHPassUser", "group": "users", - "weight": 190, + "weight": 180, "cookies": false, "type": "", "demo": "users\/create-ph-pass-user.md", @@ -33727,7 +33759,7 @@ "x-appwrite": { "method": "createScryptUser", "group": "users", - "weight": 191, + "weight": 181, "cookies": false, "type": "", "demo": "users\/create-scrypt-user.md", @@ -33843,7 +33875,7 @@ "x-appwrite": { "method": "createScryptModifiedUser", "group": "users", - "weight": 192, + "weight": 182, "cookies": false, "type": "", "demo": "users\/create-scrypt-modified-user.md", @@ -33947,7 +33979,7 @@ "x-appwrite": { "method": "createSHAUser", "group": "users", - "weight": 189, + "weight": 179, "cookies": false, "type": "", "demo": "users\/create-sha-user.md", @@ -34053,7 +34085,7 @@ "x-appwrite": { "method": "get", "group": "users", - "weight": 195, + "weight": 185, "cookies": false, "type": "", "demo": "users\/get.md", @@ -34106,7 +34138,7 @@ "x-appwrite": { "method": "delete", "group": "users", - "weight": 223, + "weight": 213, "cookies": false, "type": "", "demo": "users\/delete.md", @@ -34168,7 +34200,7 @@ "x-appwrite": { "method": "updateEmail", "group": "users", - "weight": 208, + "weight": 198, "cookies": false, "type": "", "demo": "users\/update-email.md", @@ -34249,7 +34281,7 @@ "x-appwrite": { "method": "createJWT", "group": "sessions", - "weight": 226, + "weight": 216, "cookies": false, "type": "", "demo": "users\/create-jwt.md", @@ -34332,7 +34364,7 @@ "x-appwrite": { "method": "updateLabels", "group": "users", - "weight": 204, + "weight": 194, "cookies": false, "type": "", "demo": "users\/update-labels.md", @@ -34416,7 +34448,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 200, + "weight": 190, "cookies": false, "type": "", "demo": "users\/list-logs.md", @@ -34502,7 +34534,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 199, + "weight": 189, "cookies": false, "type": "", "demo": "users\/list-memberships.md", @@ -34599,7 +34631,7 @@ "x-appwrite": { "method": "updateMfa", "group": "users", - "weight": 213, + "weight": 203, "cookies": false, "type": "", "demo": "users\/update-mfa.md", @@ -34733,7 +34765,7 @@ "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", - "weight": 218, + "weight": 208, "cookies": false, "type": "", "demo": "users\/delete-mfa-authenticator.md", @@ -34868,7 +34900,7 @@ "x-appwrite": { "method": "listMfaFactors", "group": "mfa", - "weight": 214, + "weight": 204, "cookies": false, "type": "", "demo": "users\/list-mfa-factors.md", @@ -34986,7 +35018,7 @@ "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", - "weight": 215, + "weight": 205, "cookies": false, "type": "", "demo": "users\/get-mfa-recovery-codes.md", @@ -35102,7 +35134,7 @@ "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", - "weight": 217, + "weight": 207, "cookies": false, "type": "", "demo": "users\/update-mfa-recovery-codes.md", @@ -35218,7 +35250,7 @@ "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", - "weight": 216, + "weight": 206, "cookies": false, "type": "", "demo": "users\/create-mfa-recovery-codes.md", @@ -35336,7 +35368,7 @@ "x-appwrite": { "method": "updateName", "group": "users", - "weight": 206, + "weight": 196, "cookies": false, "type": "", "demo": "users\/update-name.md", @@ -35417,7 +35449,7 @@ "x-appwrite": { "method": "updatePassword", "group": "users", - "weight": 207, + "weight": 197, "cookies": false, "type": "", "demo": "users\/update-password.md", @@ -35498,7 +35530,7 @@ "x-appwrite": { "method": "updatePhone", "group": "users", - "weight": 209, + "weight": 199, "cookies": false, "type": "", "demo": "users\/update-phone.md", @@ -35579,7 +35611,7 @@ "x-appwrite": { "method": "getPrefs", "group": "users", - "weight": 196, + "weight": 186, "cookies": false, "type": "", "demo": "users\/get-prefs.md", @@ -35639,7 +35671,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "users", - "weight": 211, + "weight": 201, "cookies": false, "type": "", "demo": "users\/update-prefs.md", @@ -35720,7 +35752,7 @@ "x-appwrite": { "method": "listSessions", "group": "sessions", - "weight": 198, + "weight": 188, "cookies": false, "type": "", "demo": "users\/list-sessions.md", @@ -35791,7 +35823,7 @@ "x-appwrite": { "method": "createSession", "group": "sessions", - "weight": 219, + "weight": 209, "cookies": false, "type": "", "demo": "users\/create-session.md", @@ -35844,7 +35876,7 @@ "x-appwrite": { "method": "deleteSessions", "group": "sessions", - "weight": 222, + "weight": 212, "cookies": false, "type": "", "demo": "users\/delete-sessions.md", @@ -35899,7 +35931,7 @@ "x-appwrite": { "method": "deleteSession", "group": "sessions", - "weight": 221, + "weight": 211, "cookies": false, "type": "", "demo": "users\/delete-session.md", @@ -35971,7 +36003,7 @@ "x-appwrite": { "method": "updateStatus", "group": "users", - "weight": 203, + "weight": 193, "cookies": false, "type": "", "demo": "users\/update-status.md", @@ -36052,7 +36084,7 @@ "x-appwrite": { "method": "listTargets", "group": "targets", - "weight": 201, + "weight": 191, "cookies": false, "type": "", "demo": "users\/list-targets.md", @@ -36137,7 +36169,7 @@ "x-appwrite": { "method": "createTarget", "group": "targets", - "weight": 193, + "weight": 183, "cookies": false, "type": "", "demo": "users\/create-target.md", @@ -36248,7 +36280,7 @@ "x-appwrite": { "method": "getTarget", "group": "targets", - "weight": 197, + "weight": 187, "cookies": false, "type": "", "demo": "users\/get-target.md", @@ -36319,7 +36351,7 @@ "x-appwrite": { "method": "updateTarget", "group": "targets", - "weight": 212, + "weight": 202, "cookies": false, "type": "", "demo": "users\/update-target.md", @@ -36409,7 +36441,7 @@ "x-appwrite": { "method": "deleteTarget", "group": "targets", - "weight": 224, + "weight": 214, "cookies": false, "type": "", "demo": "users\/delete-target.md", @@ -36482,7 +36514,7 @@ "x-appwrite": { "method": "createToken", "group": "sessions", - "weight": 220, + "weight": 210, "cookies": false, "type": "", "demo": "users\/create-token.md", @@ -36565,7 +36597,7 @@ "x-appwrite": { "method": "updateEmailVerification", "group": "users", - "weight": 210, + "weight": 200, "cookies": false, "type": "", "demo": "users\/update-email-verification.md", @@ -36646,7 +36678,7 @@ "x-appwrite": { "method": "updatePhoneVerification", "group": "users", - "weight": 205, + "weight": 195, "cookies": false, "type": "", "demo": "users\/update-phone-verification.md", diff --git a/app/config/specs/swagger2-1.8.x-client.json b/app/config/specs/swagger2-1.8.x-client.json index 1594f816ef..14010ee1f9 100644 --- a/app/config/specs/swagger2-1.8.x-client.json +++ b/app/config/specs/swagger2-1.8.x-client.json @@ -314,7 +314,7 @@ "x-appwrite": { "method": "listIdentities", "group": "identities", - "weight": 58, + "weight": 48, "cookies": false, "type": "", "demo": "account\/list-identities.md", @@ -385,7 +385,7 @@ "x-appwrite": { "method": "deleteIdentity", "group": "identities", - "weight": 59, + "weight": 49, "cookies": false, "type": "", "demo": "account\/delete-identity.md", @@ -573,7 +573,7 @@ "x-appwrite": { "method": "updateMFA", "group": "mfa", - "weight": 45, + "weight": 306, "cookies": false, "type": "", "demo": "account\/update-mfa.md", @@ -646,7 +646,7 @@ "x-appwrite": { "method": "createMfaAuthenticator", "group": "mfa", - "weight": 47, + "weight": 308, "cookies": false, "type": "", "demo": "account\/create-mfa-authenticator.md", @@ -766,7 +766,7 @@ "x-appwrite": { "method": "updateMfaAuthenticator", "group": "mfa", - "weight": 48, + "weight": 309, "cookies": false, "type": "", "demo": "account\/update-mfa-authenticator.md", @@ -903,7 +903,7 @@ "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", - "weight": 52, + "weight": 310, "cookies": false, "type": "", "demo": "account\/delete-mfa-authenticator.md", @@ -997,7 +997,7 @@ ] } }, - "\/account\/mfa\/challenge": { + "\/account\/mfa\/challenges": { "post": { "summary": "Create MFA challenge", "operationId": "accountCreateMfaChallenge", @@ -1023,7 +1023,7 @@ "x-appwrite": { "method": "createMfaChallenge", "group": "mfa", - "weight": 53, + "weight": 314, "cookies": false, "type": "", "demo": "account\/create-mfa-challenge.md", @@ -1154,7 +1154,7 @@ "x-appwrite": { "method": "updateMfaChallenge", "group": "mfa", - "weight": 54, + "weight": 315, "cookies": false, "type": "", "demo": "account\/update-mfa-challenge.md", @@ -1290,7 +1290,7 @@ "x-appwrite": { "method": "listMfaFactors", "group": "mfa", - "weight": 46, + "weight": 307, "cookies": false, "type": "", "demo": "account\/list-mfa-factors.md", @@ -1387,7 +1387,7 @@ "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", - "weight": 51, + "weight": 313, "cookies": false, "type": "", "demo": "account\/get-mfa-recovery-codes.md", @@ -1484,7 +1484,7 @@ "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", - "weight": 49, + "weight": 311, "cookies": false, "type": "", "demo": "account\/create-mfa-recovery-codes.md", @@ -1581,7 +1581,7 @@ "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", - "weight": 50, + "weight": 312, "cookies": false, "type": "", "demo": "account\/update-mfa-recovery-codes.md", @@ -3033,7 +3033,7 @@ "x-appwrite": { "method": "createPushTarget", "group": "pushTargets", - "weight": 55, + "weight": 45, "cookies": false, "type": "", "demo": "account\/create-push-target.md", @@ -3117,7 +3117,7 @@ "x-appwrite": { "method": "updatePushTarget", "group": "pushTargets", - "weight": 56, + "weight": 46, "cookies": false, "type": "", "demo": "account\/update-push-target.md", @@ -3189,7 +3189,7 @@ "x-appwrite": { "method": "deletePushTarget", "group": "pushTargets", - "weight": 57, + "weight": 47, "cookies": false, "type": "", "demo": "account\/delete-push-target.md", @@ -4030,7 +4030,7 @@ "x-appwrite": { "method": "getBrowser", "group": null, - "weight": 61, + "weight": 51, "cookies": false, "type": "location", "demo": "avatars\/get-browser.md", @@ -4154,7 +4154,7 @@ "x-appwrite": { "method": "getCreditCard", "group": null, - "weight": 60, + "weight": 50, "cookies": false, "type": "location", "demo": "avatars\/get-credit-card.md", @@ -4284,7 +4284,7 @@ "x-appwrite": { "method": "getFavicon", "group": null, - "weight": 64, + "weight": 54, "cookies": false, "type": "location", "demo": "avatars\/get-favicon.md", @@ -4346,7 +4346,7 @@ "x-appwrite": { "method": "getFlag", "group": null, - "weight": 62, + "weight": 52, "cookies": false, "type": "location", "demo": "avatars\/get-flag.md", @@ -4832,7 +4832,7 @@ "x-appwrite": { "method": "getImage", "group": null, - "weight": 63, + "weight": 53, "cookies": false, "type": "location", "demo": "avatars\/get-image.md", @@ -4914,7 +4914,7 @@ "x-appwrite": { "method": "getInitials", "group": null, - "weight": 66, + "weight": 56, "cookies": false, "type": "location", "demo": "avatars\/get-initials.md", @@ -5004,7 +5004,7 @@ "x-appwrite": { "method": "getQR", "group": null, - "weight": 65, + "weight": 55, "cookies": false, "type": "location", "demo": "avatars\/get-qr.md", @@ -5094,7 +5094,7 @@ "x-appwrite": { "method": "getScreenshot", "group": null, - "weight": 67, + "weight": 57, "cookies": false, "type": "location", "demo": "avatars\/get-screenshot.md", @@ -7420,7 +7420,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 251, + "weight": 241, "cookies": false, "type": "graphql", "demo": "graphql\/query.md", @@ -7493,7 +7493,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 250, + "weight": 240, "cookies": false, "type": "graphql", "demo": "graphql\/mutation.md", @@ -7564,7 +7564,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 71, + "weight": 61, "cookies": false, "type": "", "demo": "locale\/get.md", @@ -7615,7 +7615,7 @@ "x-appwrite": { "method": "listCodes", "group": null, - "weight": 72, + "weight": 62, "cookies": false, "type": "", "demo": "locale\/list-codes.md", @@ -7666,7 +7666,7 @@ "x-appwrite": { "method": "listContinents", "group": null, - "weight": 76, + "weight": 66, "cookies": false, "type": "", "demo": "locale\/list-continents.md", @@ -7717,7 +7717,7 @@ "x-appwrite": { "method": "listCountries", "group": null, - "weight": 73, + "weight": 63, "cookies": false, "type": "", "demo": "locale\/list-countries.md", @@ -7768,7 +7768,7 @@ "x-appwrite": { "method": "listCountriesEU", "group": null, - "weight": 74, + "weight": 64, "cookies": false, "type": "", "demo": "locale\/list-countries-eu.md", @@ -7819,7 +7819,7 @@ "x-appwrite": { "method": "listCountriesPhones", "group": null, - "weight": 75, + "weight": 65, "cookies": false, "type": "", "demo": "locale\/list-countries-phones.md", @@ -7870,7 +7870,7 @@ "x-appwrite": { "method": "listCurrencies", "group": null, - "weight": 77, + "weight": 67, "cookies": false, "type": "", "demo": "locale\/list-currencies.md", @@ -7921,7 +7921,7 @@ "x-appwrite": { "method": "listLanguages", "group": null, - "weight": 78, + "weight": 68, "cookies": false, "type": "", "demo": "locale\/list-languages.md", @@ -7974,7 +7974,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 300, + "weight": 290, "cookies": false, "type": "", "demo": "messaging\/create-subscriber.md", @@ -8058,7 +8058,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 304, + "weight": 294, "cookies": false, "type": "", "demo": "messaging\/delete-subscriber.md", @@ -8128,7 +8128,7 @@ "x-appwrite": { "method": "listFiles", "group": "files", - "weight": 161, + "weight": 151, "cookies": false, "type": "", "demo": "storage\/list-files.md", @@ -8219,7 +8219,7 @@ "x-appwrite": { "method": "createFile", "group": "files", - "weight": 160, + "weight": 150, "cookies": false, "type": "upload", "demo": "storage\/create-file.md", @@ -8308,7 +8308,7 @@ "x-appwrite": { "method": "getFile", "group": "files", - "weight": 162, + "weight": 152, "cookies": false, "type": "", "demo": "storage\/get-file.md", @@ -8377,7 +8377,7 @@ "x-appwrite": { "method": "updateFile", "group": "files", - "weight": 167, + "weight": 157, "cookies": false, "type": "", "demo": "storage\/update-file.md", @@ -8467,7 +8467,7 @@ "x-appwrite": { "method": "deleteFile", "group": "files", - "weight": 168, + "weight": 158, "cookies": false, "type": "", "demo": "storage\/delete-file.md", @@ -8536,7 +8536,7 @@ "x-appwrite": { "method": "getFileDownload", "group": "files", - "weight": 164, + "weight": 154, "cookies": false, "type": "location", "demo": "storage\/get-file-download.md", @@ -8614,7 +8614,7 @@ "x-appwrite": { "method": "getFilePreview", "group": "files", - "weight": 163, + "weight": 153, "cookies": false, "type": "location", "demo": "storage\/get-file-preview.md", @@ -8820,7 +8820,7 @@ "x-appwrite": { "method": "getFileView", "group": "files", - "weight": 165, + "weight": 155, "cookies": false, "type": "location", "demo": "storage\/get-file-view.md", @@ -10265,7 +10265,7 @@ "x-appwrite": { "method": "list", "group": "teams", - "weight": 172, + "weight": 162, "cookies": false, "type": "", "demo": "teams\/list.md", @@ -10348,7 +10348,7 @@ "x-appwrite": { "method": "create", "group": "teams", - "weight": 171, + "weight": 161, "cookies": false, "type": "", "demo": "teams\/create.md", @@ -10437,7 +10437,7 @@ "x-appwrite": { "method": "get", "group": "teams", - "weight": 173, + "weight": 163, "cookies": false, "type": "", "demo": "teams\/get.md", @@ -10498,7 +10498,7 @@ "x-appwrite": { "method": "updateName", "group": "teams", - "weight": 175, + "weight": 165, "cookies": false, "type": "", "demo": "teams\/update-name.md", @@ -10572,7 +10572,7 @@ "x-appwrite": { "method": "delete", "group": "teams", - "weight": 177, + "weight": 167, "cookies": false, "type": "", "demo": "teams\/delete.md", @@ -10633,7 +10633,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 179, + "weight": 169, "cookies": false, "type": "", "demo": "teams\/list-memberships.md", @@ -10724,7 +10724,7 @@ "x-appwrite": { "method": "createMembership", "group": "memberships", - "weight": 178, + "weight": 168, "cookies": false, "type": "", "demo": "teams\/create-membership.md", @@ -10836,7 +10836,7 @@ "x-appwrite": { "method": "getMembership", "group": "memberships", - "weight": 180, + "weight": 170, "cookies": false, "type": "", "demo": "teams\/get-membership.md", @@ -10905,7 +10905,7 @@ "x-appwrite": { "method": "updateMembership", "group": "memberships", - "weight": 181, + "weight": 171, "cookies": false, "type": "", "demo": "teams\/update-membership.md", @@ -10990,7 +10990,7 @@ "x-appwrite": { "method": "deleteMembership", "group": "memberships", - "weight": 183, + "weight": 173, "cookies": false, "type": "", "demo": "teams\/delete-membership.md", @@ -11061,7 +11061,7 @@ "x-appwrite": { "method": "updateMembershipStatus", "group": "memberships", - "weight": 182, + "weight": 172, "cookies": false, "type": "", "demo": "teams\/update-membership-status.md", @@ -11155,7 +11155,7 @@ "x-appwrite": { "method": "getPrefs", "group": "teams", - "weight": 174, + "weight": 164, "cookies": false, "type": "", "demo": "teams\/get-prefs.md", @@ -11216,7 +11216,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "teams", - "weight": 176, + "weight": 166, "cookies": false, "type": "", "demo": "teams\/update-prefs.md", diff --git a/app/config/specs/swagger2-1.8.x-console.json b/app/config/specs/swagger2-1.8.x-console.json index 5d2334764e..2457324a4a 100644 --- a/app/config/specs/swagger2-1.8.x-console.json +++ b/app/config/specs/swagger2-1.8.x-console.json @@ -361,7 +361,7 @@ "x-appwrite": { "method": "listIdentities", "group": "identities", - "weight": 58, + "weight": 48, "cookies": false, "type": "", "demo": "account\/list-identities.md", @@ -431,7 +431,7 @@ "x-appwrite": { "method": "deleteIdentity", "group": "identities", - "weight": 59, + "weight": 49, "cookies": false, "type": "", "demo": "account\/delete-identity.md", @@ -617,7 +617,7 @@ "x-appwrite": { "method": "updateMFA", "group": "mfa", - "weight": 45, + "weight": 306, "cookies": false, "type": "", "demo": "account\/update-mfa.md", @@ -689,7 +689,7 @@ "x-appwrite": { "method": "createMfaAuthenticator", "group": "mfa", - "weight": 47, + "weight": 308, "cookies": false, "type": "", "demo": "account\/create-mfa-authenticator.md", @@ -808,7 +808,7 @@ "x-appwrite": { "method": "updateMfaAuthenticator", "group": "mfa", - "weight": 48, + "weight": 309, "cookies": false, "type": "", "demo": "account\/update-mfa-authenticator.md", @@ -944,7 +944,7 @@ "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", - "weight": 52, + "weight": 310, "cookies": false, "type": "", "demo": "account\/delete-mfa-authenticator.md", @@ -1037,7 +1037,7 @@ ] } }, - "\/account\/mfa\/challenge": { + "\/account\/mfa\/challenges": { "post": { "summary": "Create MFA challenge", "operationId": "accountCreateMfaChallenge", @@ -1063,7 +1063,7 @@ "x-appwrite": { "method": "createMfaChallenge", "group": "mfa", - "weight": 53, + "weight": 314, "cookies": false, "type": "", "demo": "account\/create-mfa-challenge.md", @@ -1194,7 +1194,7 @@ "x-appwrite": { "method": "updateMfaChallenge", "group": "mfa", - "weight": 54, + "weight": 315, "cookies": false, "type": "", "demo": "account\/update-mfa-challenge.md", @@ -1329,7 +1329,7 @@ "x-appwrite": { "method": "listMfaFactors", "group": "mfa", - "weight": 46, + "weight": 307, "cookies": false, "type": "", "demo": "account\/list-mfa-factors.md", @@ -1425,7 +1425,7 @@ "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", - "weight": 51, + "weight": 313, "cookies": false, "type": "", "demo": "account\/get-mfa-recovery-codes.md", @@ -1521,7 +1521,7 @@ "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", - "weight": 49, + "weight": 311, "cookies": false, "type": "", "demo": "account\/create-mfa-recovery-codes.md", @@ -1617,7 +1617,7 @@ "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", - "weight": 50, + "weight": 312, "cookies": false, "type": "", "demo": "account\/update-mfa-recovery-codes.md", @@ -3055,7 +3055,7 @@ "x-appwrite": { "method": "createPushTarget", "group": "pushTargets", - "weight": 55, + "weight": 45, "cookies": false, "type": "", "demo": "account\/create-push-target.md", @@ -3138,7 +3138,7 @@ "x-appwrite": { "method": "updatePushTarget", "group": "pushTargets", - "weight": 56, + "weight": 46, "cookies": false, "type": "", "demo": "account\/update-push-target.md", @@ -3209,7 +3209,7 @@ "x-appwrite": { "method": "deletePushTarget", "group": "pushTargets", - "weight": 57, + "weight": 47, "cookies": false, "type": "", "demo": "account\/delete-push-target.md", @@ -4045,7 +4045,7 @@ "x-appwrite": { "method": "getBrowser", "group": null, - "weight": 61, + "weight": 51, "cookies": false, "type": "location", "demo": "avatars\/get-browser.md", @@ -4169,7 +4169,7 @@ "x-appwrite": { "method": "getCreditCard", "group": null, - "weight": 60, + "weight": 50, "cookies": false, "type": "location", "demo": "avatars\/get-credit-card.md", @@ -4299,7 +4299,7 @@ "x-appwrite": { "method": "getFavicon", "group": null, - "weight": 64, + "weight": 54, "cookies": false, "type": "location", "demo": "avatars\/get-favicon.md", @@ -4361,7 +4361,7 @@ "x-appwrite": { "method": "getFlag", "group": null, - "weight": 62, + "weight": 52, "cookies": false, "type": "location", "demo": "avatars\/get-flag.md", @@ -4847,7 +4847,7 @@ "x-appwrite": { "method": "getImage", "group": null, - "weight": 63, + "weight": 53, "cookies": false, "type": "location", "demo": "avatars\/get-image.md", @@ -4929,7 +4929,7 @@ "x-appwrite": { "method": "getInitials", "group": null, - "weight": 66, + "weight": 56, "cookies": false, "type": "location", "demo": "avatars\/get-initials.md", @@ -5019,7 +5019,7 @@ "x-appwrite": { "method": "getQR", "group": null, - "weight": 65, + "weight": 55, "cookies": false, "type": "location", "demo": "avatars\/get-qr.md", @@ -5109,7 +5109,7 @@ "x-appwrite": { "method": "getScreenshot", "group": null, - "weight": 67, + "weight": 57, "cookies": false, "type": "location", "demo": "avatars\/get-screenshot.md", @@ -5797,7 +5797,7 @@ "x-appwrite": { "method": "chat", "group": "console", - "weight": 253, + "weight": 243, "cookies": false, "type": "", "demo": "assistant\/chat.md", @@ -5931,7 +5931,7 @@ "x-appwrite": { "method": "variables", "group": "console", - "weight": 252, + "weight": 242, "cookies": false, "type": "", "demo": "console\/variables.md", @@ -7184,6 +7184,24 @@ "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", "default": true, "x-example": false + }, + "attributes": { + "type": "array", + "description": "Array of attribute definitions to create. Each attribute should contain: key (string), type (string: string, integer, float, boolean, datetime, relationship), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.", + "default": [], + "x-example": null, + "items": { + "type": "object" + } + }, + "indexes": { + "type": "array", + "description": "Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of attribute keys), orders (array of ASC\/DESC, optional), and lengths (array of integers, optional).", + "default": [], + "x-example": null, + "items": { + "type": "object" + } } }, "required": [ @@ -15585,7 +15603,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 251, + "weight": 241, "cookies": false, "type": "graphql", "demo": "graphql\/query.md", @@ -15658,7 +15676,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 250, + "weight": 240, "cookies": false, "type": "graphql", "demo": "graphql\/mutation.md", @@ -15729,7 +15747,7 @@ "x-appwrite": { "method": "get", "group": "health", - "weight": 79, + "weight": 69, "cookies": false, "type": "", "demo": "health\/get.md", @@ -15778,7 +15796,7 @@ "x-appwrite": { "method": "getAntivirus", "group": "health", - "weight": 100, + "weight": 90, "cookies": false, "type": "", "demo": "health\/get-antivirus.md", @@ -15827,7 +15845,7 @@ "x-appwrite": { "method": "getCache", "group": "health", - "weight": 82, + "weight": 72, "cookies": false, "type": "", "demo": "health\/get-cache.md", @@ -15876,7 +15894,7 @@ "x-appwrite": { "method": "getCertificate", "group": "health", - "weight": 87, + "weight": 77, "cookies": false, "type": "", "demo": "health\/get-certificate.md", @@ -15934,7 +15952,7 @@ "x-appwrite": { "method": "getDB", "group": "health", - "weight": 81, + "weight": 71, "cookies": false, "type": "", "demo": "health\/get-db.md", @@ -15983,7 +16001,7 @@ "x-appwrite": { "method": "getPubSub", "group": "health", - "weight": 83, + "weight": 73, "cookies": false, "type": "", "demo": "health\/get-pub-sub.md", @@ -16032,7 +16050,7 @@ "x-appwrite": { "method": "getQueueBuilds", "group": "queue", - "weight": 89, + "weight": 79, "cookies": false, "type": "", "demo": "health\/get-queue-builds.md", @@ -16092,7 +16110,7 @@ "x-appwrite": { "method": "getQueueCertificates", "group": "queue", - "weight": 88, + "weight": 78, "cookies": false, "type": "", "demo": "health\/get-queue-certificates.md", @@ -16152,7 +16170,7 @@ "x-appwrite": { "method": "getQueueDatabases", "group": "queue", - "weight": 90, + "weight": 80, "cookies": false, "type": "", "demo": "health\/get-queue-databases.md", @@ -16221,7 +16239,7 @@ "x-appwrite": { "method": "getQueueDeletes", "group": "queue", - "weight": 91, + "weight": 81, "cookies": false, "type": "", "demo": "health\/get-queue-deletes.md", @@ -16281,7 +16299,7 @@ "x-appwrite": { "method": "getFailedJobs", "group": "queue", - "weight": 101, + "weight": 91, "cookies": false, "type": "", "demo": "health\/get-failed-jobs.md", @@ -16365,7 +16383,7 @@ "x-appwrite": { "method": "getQueueFunctions", "group": "queue", - "weight": 95, + "weight": 85, "cookies": false, "type": "", "demo": "health\/get-queue-functions.md", @@ -16425,7 +16443,7 @@ "x-appwrite": { "method": "getQueueLogs", "group": "queue", - "weight": 86, + "weight": 76, "cookies": false, "type": "", "demo": "health\/get-queue-logs.md", @@ -16485,7 +16503,7 @@ "x-appwrite": { "method": "getQueueMails", "group": "queue", - "weight": 92, + "weight": 82, "cookies": false, "type": "", "demo": "health\/get-queue-mails.md", @@ -16545,7 +16563,7 @@ "x-appwrite": { "method": "getQueueMessaging", "group": "queue", - "weight": 93, + "weight": 83, "cookies": false, "type": "", "demo": "health\/get-queue-messaging.md", @@ -16605,7 +16623,7 @@ "x-appwrite": { "method": "getQueueMigrations", "group": "queue", - "weight": 94, + "weight": 84, "cookies": false, "type": "", "demo": "health\/get-queue-migrations.md", @@ -16665,7 +16683,7 @@ "x-appwrite": { "method": "getQueueStatsResources", "group": "queue", - "weight": 96, + "weight": 86, "cookies": false, "type": "", "demo": "health\/get-queue-stats-resources.md", @@ -16725,7 +16743,7 @@ "x-appwrite": { "method": "getQueueUsage", "group": "queue", - "weight": 97, + "weight": 87, "cookies": false, "type": "", "demo": "health\/get-queue-usage.md", @@ -16785,7 +16803,7 @@ "x-appwrite": { "method": "getQueueWebhooks", "group": "queue", - "weight": 85, + "weight": 75, "cookies": false, "type": "", "demo": "health\/get-queue-webhooks.md", @@ -16845,7 +16863,7 @@ "x-appwrite": { "method": "getStorage", "group": "storage", - "weight": 99, + "weight": 89, "cookies": false, "type": "", "demo": "health\/get-storage.md", @@ -16894,7 +16912,7 @@ "x-appwrite": { "method": "getStorageLocal", "group": "storage", - "weight": 98, + "weight": 88, "cookies": false, "type": "", "demo": "health\/get-storage-local.md", @@ -16943,7 +16961,7 @@ "x-appwrite": { "method": "getTime", "group": "health", - "weight": 84, + "weight": 74, "cookies": false, "type": "", "demo": "health\/get-time.md", @@ -16992,7 +17010,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 71, + "weight": 61, "cookies": false, "type": "", "demo": "locale\/get.md", @@ -17043,7 +17061,7 @@ "x-appwrite": { "method": "listCodes", "group": null, - "weight": 72, + "weight": 62, "cookies": false, "type": "", "demo": "locale\/list-codes.md", @@ -17094,7 +17112,7 @@ "x-appwrite": { "method": "listContinents", "group": null, - "weight": 76, + "weight": 66, "cookies": false, "type": "", "demo": "locale\/list-continents.md", @@ -17145,7 +17163,7 @@ "x-appwrite": { "method": "listCountries", "group": null, - "weight": 73, + "weight": 63, "cookies": false, "type": "", "demo": "locale\/list-countries.md", @@ -17196,7 +17214,7 @@ "x-appwrite": { "method": "listCountriesEU", "group": null, - "weight": 74, + "weight": 64, "cookies": false, "type": "", "demo": "locale\/list-countries-eu.md", @@ -17247,7 +17265,7 @@ "x-appwrite": { "method": "listCountriesPhones", "group": null, - "weight": 75, + "weight": 65, "cookies": false, "type": "", "demo": "locale\/list-countries-phones.md", @@ -17298,7 +17316,7 @@ "x-appwrite": { "method": "listCurrencies", "group": null, - "weight": 77, + "weight": 67, "cookies": false, "type": "", "demo": "locale\/list-currencies.md", @@ -17349,7 +17367,7 @@ "x-appwrite": { "method": "listLanguages", "group": null, - "weight": 78, + "weight": 68, "cookies": false, "type": "", "demo": "locale\/list-languages.md", @@ -17400,7 +17418,7 @@ "x-appwrite": { "method": "listMessages", "group": "messages", - "weight": 308, + "weight": 298, "cookies": false, "type": "", "demo": "messaging\/list-messages.md", @@ -17484,7 +17502,7 @@ "x-appwrite": { "method": "createEmail", "group": "messages", - "weight": 305, + "weight": 295, "cookies": false, "type": "", "demo": "messaging\/create-email.md", @@ -17643,7 +17661,7 @@ "x-appwrite": { "method": "updateEmail", "group": "messages", - "weight": 312, + "weight": 302, "cookies": false, "type": "", "demo": "messaging\/update-email.md", @@ -17809,7 +17827,7 @@ "x-appwrite": { "method": "createPush", "group": "messages", - "weight": 307, + "weight": 297, "cookies": false, "type": "", "demo": "messaging\/create-push.md", @@ -18006,7 +18024,7 @@ "x-appwrite": { "method": "updatePush", "group": "messages", - "weight": 314, + "weight": 304, "cookies": false, "type": "", "demo": "messaging\/update-push.md", @@ -18218,7 +18236,7 @@ "x-appwrite": { "method": "createSms", "group": "messages", - "weight": 306, + "weight": 296, "cookies": false, "type": "", "demo": "messaging\/create-sms.md", @@ -18405,7 +18423,7 @@ "x-appwrite": { "method": "updateSms", "group": "messages", - "weight": 313, + "weight": 303, "cookies": false, "type": "", "demo": "messaging\/update-sms.md", @@ -18591,7 +18609,7 @@ "x-appwrite": { "method": "getMessage", "group": "messages", - "weight": 311, + "weight": 301, "cookies": false, "type": "", "demo": "messaging\/get-message.md", @@ -18646,7 +18664,7 @@ "x-appwrite": { "method": "delete", "group": "messages", - "weight": 315, + "weight": 305, "cookies": false, "type": "", "demo": "messaging\/delete.md", @@ -18706,7 +18724,7 @@ "x-appwrite": { "method": "listMessageLogs", "group": "logs", - "weight": 309, + "weight": 299, "cookies": false, "type": "", "demo": "messaging\/list-message-logs.md", @@ -18787,7 +18805,7 @@ "x-appwrite": { "method": "listTargets", "group": "messages", - "weight": 310, + "weight": 300, "cookies": false, "type": "", "demo": "messaging\/list-targets.md", @@ -18868,7 +18886,7 @@ "x-appwrite": { "method": "listProviders", "group": "providers", - "weight": 279, + "weight": 269, "cookies": false, "type": "", "demo": "messaging\/list-providers.md", @@ -18952,7 +18970,7 @@ "x-appwrite": { "method": "createApnsProvider", "group": "providers", - "weight": 278, + "weight": 268, "cookies": false, "type": "", "demo": "messaging\/create-apns-provider.md", @@ -19138,7 +19156,7 @@ "x-appwrite": { "method": "updateApnsProvider", "group": "providers", - "weight": 292, + "weight": 282, "cookies": false, "type": "", "demo": "messaging\/update-apns-provider.md", @@ -19321,7 +19339,7 @@ "x-appwrite": { "method": "createFcmProvider", "group": "providers", - "weight": 277, + "weight": 267, "cookies": false, "type": "", "demo": "messaging\/create-fcm-provider.md", @@ -19476,7 +19494,7 @@ "x-appwrite": { "method": "updateFcmProvider", "group": "providers", - "weight": 291, + "weight": 281, "cookies": false, "type": "", "demo": "messaging\/update-fcm-provider.md", @@ -19627,7 +19645,7 @@ "x-appwrite": { "method": "createMailgunProvider", "group": "providers", - "weight": 268, + "weight": 258, "cookies": false, "type": "", "demo": "messaging\/create-mailgun-provider.md", @@ -19756,7 +19774,7 @@ "x-appwrite": { "method": "updateMailgunProvider", "group": "providers", - "weight": 282, + "weight": 272, "cookies": false, "type": "", "demo": "messaging\/update-mailgun-provider.md", @@ -19883,7 +19901,7 @@ "x-appwrite": { "method": "createMsg91Provider", "group": "providers", - "weight": 272, + "weight": 262, "cookies": false, "type": "", "demo": "messaging\/create-msg-91-provider.md", @@ -19987,7 +20005,7 @@ "x-appwrite": { "method": "updateMsg91Provider", "group": "providers", - "weight": 286, + "weight": 276, "cookies": false, "type": "", "demo": "messaging\/update-msg-91-provider.md", @@ -20089,7 +20107,7 @@ "x-appwrite": { "method": "createResendProvider", "group": "providers", - "weight": 270, + "weight": 260, "cookies": false, "type": "", "demo": "messaging\/create-resend-provider.md", @@ -20205,7 +20223,7 @@ "x-appwrite": { "method": "updateResendProvider", "group": "providers", - "weight": 284, + "weight": 274, "cookies": false, "type": "", "demo": "messaging\/update-resend-provider.md", @@ -20319,7 +20337,7 @@ "x-appwrite": { "method": "createSendgridProvider", "group": "providers", - "weight": 269, + "weight": 259, "cookies": false, "type": "", "demo": "messaging\/create-sendgrid-provider.md", @@ -20435,7 +20453,7 @@ "x-appwrite": { "method": "updateSendgridProvider", "group": "providers", - "weight": 283, + "weight": 273, "cookies": false, "type": "", "demo": "messaging\/update-sendgrid-provider.md", @@ -20549,7 +20567,7 @@ "x-appwrite": { "method": "createSmtpProvider", "group": "providers", - "weight": 271, + "weight": 261, "cookies": false, "type": "", "demo": "messaging\/create-smtp-provider.md", @@ -20793,7 +20811,7 @@ "x-appwrite": { "method": "updateSmtpProvider", "group": "providers", - "weight": 285, + "weight": 275, "cookies": false, "type": "", "demo": "messaging\/update-smtp-provider.md", @@ -21032,7 +21050,7 @@ "x-appwrite": { "method": "createTelesignProvider", "group": "providers", - "weight": 273, + "weight": 263, "cookies": false, "type": "", "demo": "messaging\/create-telesign-provider.md", @@ -21136,7 +21154,7 @@ "x-appwrite": { "method": "updateTelesignProvider", "group": "providers", - "weight": 287, + "weight": 277, "cookies": false, "type": "", "demo": "messaging\/update-telesign-provider.md", @@ -21238,7 +21256,7 @@ "x-appwrite": { "method": "createTextmagicProvider", "group": "providers", - "weight": 274, + "weight": 264, "cookies": false, "type": "", "demo": "messaging\/create-textmagic-provider.md", @@ -21342,7 +21360,7 @@ "x-appwrite": { "method": "updateTextmagicProvider", "group": "providers", - "weight": 288, + "weight": 278, "cookies": false, "type": "", "demo": "messaging\/update-textmagic-provider.md", @@ -21444,7 +21462,7 @@ "x-appwrite": { "method": "createTwilioProvider", "group": "providers", - "weight": 275, + "weight": 265, "cookies": false, "type": "", "demo": "messaging\/create-twilio-provider.md", @@ -21548,7 +21566,7 @@ "x-appwrite": { "method": "updateTwilioProvider", "group": "providers", - "weight": 289, + "weight": 279, "cookies": false, "type": "", "demo": "messaging\/update-twilio-provider.md", @@ -21650,7 +21668,7 @@ "x-appwrite": { "method": "createVonageProvider", "group": "providers", - "weight": 276, + "weight": 266, "cookies": false, "type": "", "demo": "messaging\/create-vonage-provider.md", @@ -21754,7 +21772,7 @@ "x-appwrite": { "method": "updateVonageProvider", "group": "providers", - "weight": 290, + "weight": 280, "cookies": false, "type": "", "demo": "messaging\/update-vonage-provider.md", @@ -21854,7 +21872,7 @@ "x-appwrite": { "method": "getProvider", "group": "providers", - "weight": 281, + "weight": 271, "cookies": false, "type": "", "demo": "messaging\/get-provider.md", @@ -21909,7 +21927,7 @@ "x-appwrite": { "method": "deleteProvider", "group": "providers", - "weight": 293, + "weight": 283, "cookies": false, "type": "", "demo": "messaging\/delete-provider.md", @@ -21969,7 +21987,7 @@ "x-appwrite": { "method": "listProviderLogs", "group": "providers", - "weight": 280, + "weight": 270, "cookies": false, "type": "", "demo": "messaging\/list-provider-logs.md", @@ -22050,7 +22068,7 @@ "x-appwrite": { "method": "listSubscriberLogs", "group": "subscribers", - "weight": 302, + "weight": 292, "cookies": false, "type": "", "demo": "messaging\/list-subscriber-logs.md", @@ -22131,7 +22149,7 @@ "x-appwrite": { "method": "listTopics", "group": "topics", - "weight": 295, + "weight": 285, "cookies": false, "type": "", "demo": "messaging\/list-topics.md", @@ -22213,7 +22231,7 @@ "x-appwrite": { "method": "createTopic", "group": "topics", - "weight": 294, + "weight": 284, "cookies": false, "type": "", "demo": "messaging\/create-topic.md", @@ -22301,7 +22319,7 @@ "x-appwrite": { "method": "getTopic", "group": "topics", - "weight": 297, + "weight": 287, "cookies": false, "type": "", "demo": "messaging\/get-topic.md", @@ -22361,7 +22379,7 @@ "x-appwrite": { "method": "updateTopic", "group": "topics", - "weight": 298, + "weight": 288, "cookies": false, "type": "", "demo": "messaging\/update-topic.md", @@ -22442,7 +22460,7 @@ "x-appwrite": { "method": "deleteTopic", "group": "topics", - "weight": 299, + "weight": 289, "cookies": false, "type": "", "demo": "messaging\/delete-topic.md", @@ -22502,7 +22520,7 @@ "x-appwrite": { "method": "listTopicLogs", "group": "topics", - "weight": 296, + "weight": 286, "cookies": false, "type": "", "demo": "messaging\/list-topic-logs.md", @@ -22583,7 +22601,7 @@ "x-appwrite": { "method": "listSubscribers", "group": "subscribers", - "weight": 301, + "weight": 291, "cookies": false, "type": "", "demo": "messaging\/list-subscribers.md", @@ -22673,7 +22691,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 300, + "weight": 290, "cookies": false, "type": "", "demo": "messaging\/create-subscriber.md", @@ -22760,7 +22778,7 @@ "x-appwrite": { "method": "getSubscriber", "group": "subscribers", - "weight": 303, + "weight": 293, "cookies": false, "type": "", "demo": "messaging\/get-subscriber.md", @@ -22823,7 +22841,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 304, + "weight": 294, "cookies": false, "type": "", "demo": "messaging\/delete-subscriber.md", @@ -22893,7 +22911,7 @@ "x-appwrite": { "method": "list", "group": null, - "weight": 260, + "weight": 250, "cookies": false, "type": "", "demo": "migrations\/list.md", @@ -22975,7 +22993,7 @@ "x-appwrite": { "method": "createAppwriteMigration", "group": null, - "weight": 254, + "weight": 244, "cookies": false, "type": "", "demo": "migrations\/create-appwrite-migration.md", @@ -23067,7 +23085,7 @@ "x-appwrite": { "method": "getAppwriteReport", "group": null, - "weight": 262, + "weight": 252, "cookies": false, "type": "", "demo": "migrations\/get-appwrite-report.md", @@ -23155,7 +23173,7 @@ "x-appwrite": { "method": "createCSVExport", "group": null, - "weight": 259, + "weight": 249, "cookies": false, "type": "", "demo": "migrations\/create-csv-export.md", @@ -23280,7 +23298,7 @@ "x-appwrite": { "method": "createCSVImport", "group": null, - "weight": 258, + "weight": 248, "cookies": false, "type": "", "demo": "migrations\/create-csv-import.md", @@ -23370,7 +23388,7 @@ "x-appwrite": { "method": "createFirebaseMigration", "group": null, - "weight": 255, + "weight": 245, "cookies": false, "type": "", "demo": "migrations\/create-firebase-migration.md", @@ -23448,7 +23466,7 @@ "x-appwrite": { "method": "getFirebaseReport", "group": null, - "weight": 263, + "weight": 253, "cookies": false, "type": "", "demo": "migrations\/get-firebase-report.md", @@ -23519,7 +23537,7 @@ "x-appwrite": { "method": "createNHostMigration", "group": null, - "weight": 257, + "weight": 247, "cookies": false, "type": "", "demo": "migrations\/create-n-host-migration.md", @@ -23638,7 +23656,7 @@ "x-appwrite": { "method": "getNHostReport", "group": null, - "weight": 265, + "weight": 255, "cookies": false, "type": "", "demo": "migrations\/get-n-host-report.md", @@ -23758,7 +23776,7 @@ "x-appwrite": { "method": "createSupabaseMigration", "group": null, - "weight": 256, + "weight": 246, "cookies": false, "type": "", "demo": "migrations\/create-supabase-migration.md", @@ -23870,7 +23888,7 @@ "x-appwrite": { "method": "getSupabaseReport", "group": null, - "weight": 264, + "weight": 254, "cookies": false, "type": "", "demo": "migrations\/get-supabase-report.md", @@ -23981,7 +23999,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 261, + "weight": 251, "cookies": false, "type": "", "demo": "migrations\/get.md", @@ -24039,7 +24057,7 @@ "x-appwrite": { "method": "retry", "group": null, - "weight": 266, + "weight": 256, "cookies": false, "type": "", "demo": "migrations\/retry.md", @@ -24092,7 +24110,7 @@ "x-appwrite": { "method": "delete", "group": null, - "weight": 267, + "weight": 257, "cookies": false, "type": "", "demo": "migrations\/delete.md", @@ -24150,7 +24168,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 149, + "weight": 139, "cookies": false, "type": "", "demo": "project\/get-usage.md", @@ -24232,7 +24250,7 @@ "x-appwrite": { "method": "listVariables", "group": null, - "weight": 151, + "weight": 141, "cookies": false, "type": "", "demo": "project\/list-variables.md", @@ -24280,7 +24298,7 @@ "x-appwrite": { "method": "createVariable", "group": null, - "weight": 150, + "weight": 140, "cookies": false, "type": "", "demo": "project\/create-variable.md", @@ -24361,7 +24379,7 @@ "x-appwrite": { "method": "getVariable", "group": null, - "weight": 152, + "weight": 142, "cookies": false, "type": "", "demo": "project\/get-variable.md", @@ -24419,7 +24437,7 @@ "x-appwrite": { "method": "updateVariable", "group": null, - "weight": 153, + "weight": 143, "cookies": false, "type": "", "demo": "project\/update-variable.md", @@ -24504,7 +24522,7 @@ "x-appwrite": { "method": "deleteVariable", "group": null, - "weight": 154, + "weight": 144, "cookies": false, "type": "", "demo": "project\/delete-variable.md", @@ -24642,7 +24660,7 @@ "x-appwrite": { "method": "create", "group": "projects", - "weight": 103, + "weight": 93, "cookies": false, "type": "", "demo": "projects\/create.md", @@ -24789,7 +24807,7 @@ "x-appwrite": { "method": "get", "group": "projects", - "weight": 104, + "weight": 94, "cookies": false, "type": "", "demo": "projects\/get.md", @@ -24847,7 +24865,7 @@ "x-appwrite": { "method": "update", "group": "projects", - "weight": 105, + "weight": 95, "cookies": false, "type": "", "demo": "projects\/update.md", @@ -24972,7 +24990,7 @@ "x-appwrite": { "method": "delete", "group": "projects", - "weight": 122, + "weight": 112, "cookies": false, "type": "", "demo": "projects\/delete.md", @@ -25032,7 +25050,7 @@ "x-appwrite": { "method": "updateApiStatus", "group": "projects", - "weight": 109, + "weight": 99, "cookies": false, "type": "", "demo": "projects\/update-api-status.md", @@ -25186,7 +25204,7 @@ "x-appwrite": { "method": "updateApiStatusAll", "group": "projects", - "weight": 110, + "weight": 100, "cookies": false, "type": "", "demo": "projects\/update-api-status-all.md", @@ -25322,7 +25340,7 @@ "x-appwrite": { "method": "updateAuthDuration", "group": "auth", - "weight": 115, + "weight": 105, "cookies": false, "type": "", "demo": "projects\/update-auth-duration.md", @@ -25400,7 +25418,7 @@ "x-appwrite": { "method": "updateAuthLimit", "group": "auth", - "weight": 114, + "weight": 104, "cookies": false, "type": "", "demo": "projects\/update-auth-limit.md", @@ -25478,7 +25496,7 @@ "x-appwrite": { "method": "updateAuthSessionsLimit", "group": "auth", - "weight": 120, + "weight": 110, "cookies": false, "type": "", "demo": "projects\/update-auth-sessions-limit.md", @@ -25556,7 +25574,7 @@ "x-appwrite": { "method": "updateMembershipsPrivacy", "group": "auth", - "weight": 113, + "weight": 103, "cookies": false, "type": "", "demo": "projects\/update-memberships-privacy.md", @@ -25648,7 +25666,7 @@ "x-appwrite": { "method": "updateMockNumbers", "group": "auth", - "weight": 121, + "weight": 111, "cookies": false, "type": "", "demo": "projects\/update-mock-numbers.md", @@ -25729,7 +25747,7 @@ "x-appwrite": { "method": "updateAuthPasswordDictionary", "group": "auth", - "weight": 118, + "weight": 108, "cookies": false, "type": "", "demo": "projects\/update-auth-password-dictionary.md", @@ -25807,7 +25825,7 @@ "x-appwrite": { "method": "updateAuthPasswordHistory", "group": "auth", - "weight": 117, + "weight": 107, "cookies": false, "type": "", "demo": "projects\/update-auth-password-history.md", @@ -25885,7 +25903,7 @@ "x-appwrite": { "method": "updatePersonalDataCheck", "group": "auth", - "weight": 119, + "weight": 109, "cookies": false, "type": "", "demo": "projects\/update-personal-data-check.md", @@ -25963,7 +25981,7 @@ "x-appwrite": { "method": "updateSessionAlerts", "group": "auth", - "weight": 112, + "weight": 102, "cookies": false, "type": "", "demo": "projects\/update-session-alerts.md", @@ -26041,7 +26059,7 @@ "x-appwrite": { "method": "updateSessionInvalidation", "group": "auth", - "weight": 148, + "weight": 138, "cookies": false, "type": "", "demo": "projects\/update-session-invalidation.md", @@ -26119,7 +26137,7 @@ "x-appwrite": { "method": "updateAuthStatus", "group": "auth", - "weight": 116, + "weight": 106, "cookies": false, "type": "", "demo": "projects\/update-auth-status.md", @@ -26587,7 +26605,7 @@ "x-appwrite": { "method": "createJWT", "group": "auth", - "weight": 134, + "weight": 124, "cookies": false, "type": "", "demo": "projects\/create-jwt.md", @@ -26672,7 +26690,7 @@ "x-appwrite": { "method": "listKeys", "group": "keys", - "weight": 130, + "weight": 120, "cookies": false, "type": "", "demo": "projects\/list-keys.md", @@ -26739,7 +26757,7 @@ "x-appwrite": { "method": "createKey", "group": "keys", - "weight": 129, + "weight": 119, "cookies": false, "type": "", "demo": "projects\/create-key.md", @@ -26833,7 +26851,7 @@ "x-appwrite": { "method": "getKey", "group": "keys", - "weight": 131, + "weight": 121, "cookies": false, "type": "", "demo": "projects\/get-key.md", @@ -26899,7 +26917,7 @@ "x-appwrite": { "method": "updateKey", "group": "keys", - "weight": 132, + "weight": 122, "cookies": false, "type": "", "demo": "projects\/update-key.md", @@ -26996,7 +27014,7 @@ "x-appwrite": { "method": "deleteKey", "group": "keys", - "weight": 133, + "weight": 123, "cookies": false, "type": "", "demo": "projects\/delete-key.md", @@ -27064,7 +27082,7 @@ "x-appwrite": { "method": "updateOAuth2", "group": "auth", - "weight": 111, + "weight": 101, "cookies": false, "type": "", "demo": "projects\/update-o-auth-2.md", @@ -27205,7 +27223,7 @@ "x-appwrite": { "method": "listPlatforms", "group": "platforms", - "weight": 136, + "weight": 126, "cookies": false, "type": "", "demo": "projects\/list-platforms.md", @@ -27272,7 +27290,7 @@ "x-appwrite": { "method": "createPlatform", "group": "platforms", - "weight": 135, + "weight": 125, "cookies": false, "type": "", "demo": "projects\/create-platform.md", @@ -27392,7 +27410,7 @@ "x-appwrite": { "method": "getPlatform", "group": "platforms", - "weight": 137, + "weight": 127, "cookies": false, "type": "", "demo": "projects\/get-platform.md", @@ -27458,7 +27476,7 @@ "x-appwrite": { "method": "updatePlatform", "group": "platforms", - "weight": 138, + "weight": 128, "cookies": false, "type": "", "demo": "projects\/update-platform.md", @@ -27555,7 +27573,7 @@ "x-appwrite": { "method": "deletePlatform", "group": "platforms", - "weight": 139, + "weight": 129, "cookies": false, "type": "", "demo": "projects\/delete-platform.md", @@ -27623,7 +27641,7 @@ "x-appwrite": { "method": "updateServiceStatus", "group": "projects", - "weight": 107, + "weight": 97, "cookies": false, "type": "", "demo": "projects\/update-service-status.md", @@ -27725,7 +27743,7 @@ "x-appwrite": { "method": "updateServiceStatusAll", "group": "projects", - "weight": 108, + "weight": 98, "cookies": false, "type": "", "demo": "projects\/update-service-status-all.md", @@ -27803,7 +27821,7 @@ "x-appwrite": { "method": "updateSmtp", "group": "templates", - "weight": 140, + "weight": 130, "cookies": false, "type": "", "demo": "projects\/update-smtp.md", @@ -28006,7 +28024,7 @@ "x-appwrite": { "method": "createSmtpTest", "group": "templates", - "weight": 141, + "weight": 131, "cookies": false, "type": "", "demo": "projects\/create-smtp-test.md", @@ -28222,7 +28240,7 @@ "x-appwrite": { "method": "updateTeam", "group": "projects", - "weight": 106, + "weight": 96, "cookies": false, "type": "", "demo": "projects\/update-team.md", @@ -28298,7 +28316,7 @@ "x-appwrite": { "method": "getEmailTemplate", "group": "templates", - "weight": 143, + "weight": 133, "cookies": false, "type": "", "demo": "projects\/get-email-template.md", @@ -28518,7 +28536,7 @@ "x-appwrite": { "method": "updateEmailTemplate", "group": "templates", - "weight": 145, + "weight": 135, "cookies": false, "type": "", "demo": "projects\/update-email-template.md", @@ -28781,7 +28799,7 @@ "x-appwrite": { "method": "deleteEmailTemplate", "group": "templates", - "weight": 147, + "weight": 137, "cookies": false, "type": "", "demo": "projects\/delete-email-template.md", @@ -29001,7 +29019,7 @@ "x-appwrite": { "method": "getSmsTemplate", "group": "templates", - "weight": 142, + "weight": 132, "cookies": false, "type": "", "demo": "projects\/get-sms-template.md", @@ -29280,7 +29298,7 @@ "x-appwrite": { "method": "updateSmsTemplate", "group": "templates", - "weight": 144, + "weight": 134, "cookies": false, "type": "", "demo": "projects\/update-sms-template.md", @@ -29581,7 +29599,7 @@ "x-appwrite": { "method": "deleteSmsTemplate", "group": "templates", - "weight": 146, + "weight": 136, "cookies": false, "type": "", "demo": "projects\/delete-sms-template.md", @@ -29860,7 +29878,7 @@ "x-appwrite": { "method": "listWebhooks", "group": "webhooks", - "weight": 124, + "weight": 114, "cookies": false, "type": "", "demo": "projects\/list-webhooks.md", @@ -29927,7 +29945,7 @@ "x-appwrite": { "method": "createWebhook", "group": "webhooks", - "weight": 123, + "weight": 113, "cookies": false, "type": "", "demo": "projects\/create-webhook.md", @@ -30045,7 +30063,7 @@ "x-appwrite": { "method": "getWebhook", "group": "webhooks", - "weight": 125, + "weight": 115, "cookies": false, "type": "", "demo": "projects\/get-webhook.md", @@ -30111,7 +30129,7 @@ "x-appwrite": { "method": "updateWebhook", "group": "webhooks", - "weight": 126, + "weight": 116, "cookies": false, "type": "", "demo": "projects\/update-webhook.md", @@ -30232,7 +30250,7 @@ "x-appwrite": { "method": "deleteWebhook", "group": "webhooks", - "weight": 128, + "weight": 118, "cookies": false, "type": "", "demo": "projects\/delete-webhook.md", @@ -30300,7 +30318,7 @@ "x-appwrite": { "method": "updateWebhookSignature", "group": "webhooks", - "weight": 127, + "weight": 117, "cookies": false, "type": "", "demo": "projects\/update-webhook-signature.md", @@ -33539,7 +33557,7 @@ "x-appwrite": { "method": "listBuckets", "group": "buckets", - "weight": 156, + "weight": 146, "cookies": false, "type": "", "demo": "storage\/list-buckets.md", @@ -33620,7 +33638,7 @@ "x-appwrite": { "method": "createBucket", "group": "buckets", - "weight": 155, + "weight": 145, "cookies": false, "type": "", "demo": "storage\/create-bucket.md", @@ -33764,7 +33782,7 @@ "x-appwrite": { "method": "getBucket", "group": "buckets", - "weight": 157, + "weight": 147, "cookies": false, "type": "", "demo": "storage\/get-bucket.md", @@ -33823,7 +33841,7 @@ "x-appwrite": { "method": "updateBucket", "group": "buckets", - "weight": 158, + "weight": 148, "cookies": false, "type": "", "demo": "storage\/update-bucket.md", @@ -33963,7 +33981,7 @@ "x-appwrite": { "method": "deleteBucket", "group": "buckets", - "weight": 159, + "weight": 149, "cookies": false, "type": "", "demo": "storage\/delete-bucket.md", @@ -34022,7 +34040,7 @@ "x-appwrite": { "method": "listFiles", "group": "files", - "weight": 161, + "weight": 151, "cookies": false, "type": "", "demo": "storage\/list-files.md", @@ -34113,7 +34131,7 @@ "x-appwrite": { "method": "createFile", "group": "files", - "weight": 160, + "weight": 150, "cookies": false, "type": "upload", "demo": "storage\/create-file.md", @@ -34202,7 +34220,7 @@ "x-appwrite": { "method": "getFile", "group": "files", - "weight": 162, + "weight": 152, "cookies": false, "type": "", "demo": "storage\/get-file.md", @@ -34271,7 +34289,7 @@ "x-appwrite": { "method": "updateFile", "group": "files", - "weight": 167, + "weight": 157, "cookies": false, "type": "", "demo": "storage\/update-file.md", @@ -34361,7 +34379,7 @@ "x-appwrite": { "method": "deleteFile", "group": "files", - "weight": 168, + "weight": 158, "cookies": false, "type": "", "demo": "storage\/delete-file.md", @@ -34430,7 +34448,7 @@ "x-appwrite": { "method": "getFileDownload", "group": "files", - "weight": 164, + "weight": 154, "cookies": false, "type": "location", "demo": "storage\/get-file-download.md", @@ -34508,7 +34526,7 @@ "x-appwrite": { "method": "getFilePreview", "group": "files", - "weight": 163, + "weight": 153, "cookies": false, "type": "location", "demo": "storage\/get-file-preview.md", @@ -34714,7 +34732,7 @@ "x-appwrite": { "method": "getFileView", "group": "files", - "weight": 165, + "weight": 155, "cookies": false, "type": "location", "demo": "storage\/get-file-view.md", @@ -34792,7 +34810,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 169, + "weight": 159, "cookies": false, "type": "", "demo": "storage\/get-usage.md", @@ -34862,7 +34880,7 @@ "x-appwrite": { "method": "getBucketUsage", "group": null, - "weight": 170, + "weight": 160, "cookies": false, "type": "", "demo": "storage\/get-bucket-usage.md", @@ -35991,6 +36009,24 @@ "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", "default": true, "x-example": false + }, + "columns": { + "type": "array", + "description": "Array of column definitions to create. Each column should contain: key (string), type (string: string, integer, float, boolean, datetime, relationship), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.", + "default": [], + "x-example": null, + "items": { + "type": "object" + } + }, + "indexes": { + "type": "array", + "description": "Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of column keys), orders (array of ASC\/DESC, optional), and lengths (array of integers, optional).", + "default": [], + "x-example": null, + "items": { + "type": "object" + } } }, "required": [ @@ -41553,7 +41589,7 @@ "x-appwrite": { "method": "list", "group": "teams", - "weight": 172, + "weight": 162, "cookies": false, "type": "", "demo": "teams\/list.md", @@ -41636,7 +41672,7 @@ "x-appwrite": { "method": "create", "group": "teams", - "weight": 171, + "weight": 161, "cookies": false, "type": "", "demo": "teams\/create.md", @@ -41725,7 +41761,7 @@ "x-appwrite": { "method": "get", "group": "teams", - "weight": 173, + "weight": 163, "cookies": false, "type": "", "demo": "teams\/get.md", @@ -41786,7 +41822,7 @@ "x-appwrite": { "method": "updateName", "group": "teams", - "weight": 175, + "weight": 165, "cookies": false, "type": "", "demo": "teams\/update-name.md", @@ -41860,7 +41896,7 @@ "x-appwrite": { "method": "delete", "group": "teams", - "weight": 177, + "weight": 167, "cookies": false, "type": "", "demo": "teams\/delete.md", @@ -41921,7 +41957,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 184, + "weight": 174, "cookies": false, "type": "", "demo": "teams\/list-logs.md", @@ -42000,7 +42036,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 179, + "weight": 169, "cookies": false, "type": "", "demo": "teams\/list-memberships.md", @@ -42091,7 +42127,7 @@ "x-appwrite": { "method": "createMembership", "group": "memberships", - "weight": 178, + "weight": 168, "cookies": false, "type": "", "demo": "teams\/create-membership.md", @@ -42203,7 +42239,7 @@ "x-appwrite": { "method": "getMembership", "group": "memberships", - "weight": 180, + "weight": 170, "cookies": false, "type": "", "demo": "teams\/get-membership.md", @@ -42272,7 +42308,7 @@ "x-appwrite": { "method": "updateMembership", "group": "memberships", - "weight": 181, + "weight": 171, "cookies": false, "type": "", "demo": "teams\/update-membership.md", @@ -42357,7 +42393,7 @@ "x-appwrite": { "method": "deleteMembership", "group": "memberships", - "weight": 183, + "weight": 173, "cookies": false, "type": "", "demo": "teams\/delete-membership.md", @@ -42428,7 +42464,7 @@ "x-appwrite": { "method": "updateMembershipStatus", "group": "memberships", - "weight": 182, + "weight": 172, "cookies": false, "type": "", "demo": "teams\/update-membership-status.md", @@ -42521,7 +42557,7 @@ "x-appwrite": { "method": "getPrefs", "group": "teams", - "weight": 174, + "weight": 164, "cookies": false, "type": "", "demo": "teams\/get-prefs.md", @@ -42581,7 +42617,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "teams", - "weight": 176, + "weight": 166, "cookies": false, "type": "", "demo": "teams\/update-prefs.md", @@ -43023,7 +43059,7 @@ "x-appwrite": { "method": "list", "group": "users", - "weight": 194, + "weight": 184, "cookies": false, "type": "", "demo": "users\/list.md", @@ -43104,7 +43140,7 @@ "x-appwrite": { "method": "create", "group": "users", - "weight": 185, + "weight": 175, "cookies": false, "type": "", "demo": "users\/create.md", @@ -43201,7 +43237,7 @@ "x-appwrite": { "method": "createArgon2User", "group": "users", - "weight": 188, + "weight": 178, "cookies": false, "type": "", "demo": "users\/create-argon-2-user.md", @@ -43292,7 +43328,7 @@ "x-appwrite": { "method": "createBcryptUser", "group": "users", - "weight": 186, + "weight": 176, "cookies": false, "type": "", "demo": "users\/create-bcrypt-user.md", @@ -43381,7 +43417,7 @@ "x-appwrite": { "method": "listIdentities", "group": "identities", - "weight": 202, + "weight": 192, "cookies": false, "type": "", "demo": "users\/list-identities.md", @@ -43459,7 +43495,7 @@ "x-appwrite": { "method": "deleteIdentity", "group": "identities", - "weight": 225, + "weight": 215, "cookies": false, "type": "", "demo": "users\/delete-identity.md", @@ -43520,7 +43556,7 @@ "x-appwrite": { "method": "createMD5User", "group": "users", - "weight": 187, + "weight": 177, "cookies": false, "type": "", "demo": "users\/create-md-5-user.md", @@ -43611,7 +43647,7 @@ "x-appwrite": { "method": "createPHPassUser", "group": "users", - "weight": 190, + "weight": 180, "cookies": false, "type": "", "demo": "users\/create-ph-pass-user.md", @@ -43702,7 +43738,7 @@ "x-appwrite": { "method": "createScryptUser", "group": "users", - "weight": 191, + "weight": 181, "cookies": false, "type": "", "demo": "users\/create-scrypt-user.md", @@ -43828,7 +43864,7 @@ "x-appwrite": { "method": "createScryptModifiedUser", "group": "users", - "weight": 192, + "weight": 182, "cookies": false, "type": "", "demo": "users\/create-scrypt-modified-user.md", @@ -43940,7 +43976,7 @@ "x-appwrite": { "method": "createSHAUser", "group": "users", - "weight": 189, + "weight": 179, "cookies": false, "type": "", "demo": "users\/create-sha-user.md", @@ -44050,7 +44086,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 227, + "weight": 217, "cookies": false, "type": "", "demo": "users\/get-usage.md", @@ -44120,7 +44156,7 @@ "x-appwrite": { "method": "get", "group": "users", - "weight": 195, + "weight": 185, "cookies": false, "type": "", "demo": "users\/get.md", @@ -44174,7 +44210,7 @@ "x-appwrite": { "method": "delete", "group": "users", - "weight": 223, + "weight": 213, "cookies": false, "type": "", "demo": "users\/delete.md", @@ -44235,7 +44271,7 @@ "x-appwrite": { "method": "updateEmail", "group": "users", - "weight": 208, + "weight": 198, "cookies": false, "type": "", "demo": "users\/update-email.md", @@ -44314,7 +44350,7 @@ "x-appwrite": { "method": "createJWT", "group": "sessions", - "weight": 226, + "weight": 216, "cookies": false, "type": "", "demo": "users\/create-jwt.md", @@ -44396,7 +44432,7 @@ "x-appwrite": { "method": "updateLabels", "group": "users", - "weight": 204, + "weight": 194, "cookies": false, "type": "", "demo": "users\/update-labels.md", @@ -44476,7 +44512,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 200, + "weight": 190, "cookies": false, "type": "", "demo": "users\/list-logs.md", @@ -44556,7 +44592,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 199, + "weight": 189, "cookies": false, "type": "", "demo": "users\/list-memberships.md", @@ -44647,7 +44683,7 @@ "x-appwrite": { "method": "updateMfa", "group": "users", - "weight": 213, + "weight": 203, "cookies": false, "type": "", "demo": "users\/update-mfa.md", @@ -44779,7 +44815,7 @@ "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", - "weight": 218, + "weight": 208, "cookies": false, "type": "", "demo": "users\/delete-mfa-authenticator.md", @@ -44907,7 +44943,7 @@ "x-appwrite": { "method": "listMfaFactors", "group": "mfa", - "weight": 214, + "weight": 204, "cookies": false, "type": "", "demo": "users\/list-mfa-factors.md", @@ -45020,7 +45056,7 @@ "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", - "weight": 215, + "weight": 205, "cookies": false, "type": "", "demo": "users\/get-mfa-recovery-codes.md", @@ -45133,7 +45169,7 @@ "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", - "weight": 217, + "weight": 207, "cookies": false, "type": "", "demo": "users\/update-mfa-recovery-codes.md", @@ -45246,7 +45282,7 @@ "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", - "weight": 216, + "weight": 206, "cookies": false, "type": "", "demo": "users\/create-mfa-recovery-codes.md", @@ -45361,7 +45397,7 @@ "x-appwrite": { "method": "updateName", "group": "users", - "weight": 206, + "weight": 196, "cookies": false, "type": "", "demo": "users\/update-name.md", @@ -45440,7 +45476,7 @@ "x-appwrite": { "method": "updatePassword", "group": "users", - "weight": 207, + "weight": 197, "cookies": false, "type": "", "demo": "users\/update-password.md", @@ -45519,7 +45555,7 @@ "x-appwrite": { "method": "updatePhone", "group": "users", - "weight": 209, + "weight": 199, "cookies": false, "type": "", "demo": "users\/update-phone.md", @@ -45596,7 +45632,7 @@ "x-appwrite": { "method": "getPrefs", "group": "users", - "weight": 196, + "weight": 186, "cookies": false, "type": "", "demo": "users\/get-prefs.md", @@ -45655,7 +45691,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "users", - "weight": 211, + "weight": 201, "cookies": false, "type": "", "demo": "users\/update-prefs.md", @@ -45732,7 +45768,7 @@ "x-appwrite": { "method": "listSessions", "group": "sessions", - "weight": 198, + "weight": 188, "cookies": false, "type": "", "demo": "users\/list-sessions.md", @@ -45800,7 +45836,7 @@ "x-appwrite": { "method": "createSession", "group": "sessions", - "weight": 219, + "weight": 209, "cookies": false, "type": "", "demo": "users\/create-session.md", @@ -45854,7 +45890,7 @@ "x-appwrite": { "method": "deleteSessions", "group": "sessions", - "weight": 222, + "weight": 212, "cookies": false, "type": "", "demo": "users\/delete-sessions.md", @@ -45910,7 +45946,7 @@ "x-appwrite": { "method": "deleteSession", "group": "sessions", - "weight": 221, + "weight": 211, "cookies": false, "type": "", "demo": "users\/delete-session.md", @@ -45979,7 +46015,7 @@ "x-appwrite": { "method": "updateStatus", "group": "users", - "weight": 203, + "weight": 193, "cookies": false, "type": "", "demo": "users\/update-status.md", @@ -46056,7 +46092,7 @@ "x-appwrite": { "method": "listTargets", "group": "targets", - "weight": 201, + "weight": 191, "cookies": false, "type": "", "demo": "users\/list-targets.md", @@ -46137,7 +46173,7 @@ "x-appwrite": { "method": "createTarget", "group": "targets", - "weight": 193, + "weight": 183, "cookies": false, "type": "", "demo": "users\/create-target.md", @@ -46248,7 +46284,7 @@ "x-appwrite": { "method": "getTarget", "group": "targets", - "weight": 197, + "weight": 187, "cookies": false, "type": "", "demo": "users\/get-target.md", @@ -46316,7 +46352,7 @@ "x-appwrite": { "method": "updateTarget", "group": "targets", - "weight": 212, + "weight": 202, "cookies": false, "type": "", "demo": "users\/update-target.md", @@ -46406,7 +46442,7 @@ "x-appwrite": { "method": "deleteTarget", "group": "targets", - "weight": 224, + "weight": 214, "cookies": false, "type": "", "demo": "users\/delete-target.md", @@ -46476,7 +46512,7 @@ "x-appwrite": { "method": "createToken", "group": "sessions", - "weight": 220, + "weight": 210, "cookies": false, "type": "", "demo": "users\/create-token.md", @@ -46558,7 +46594,7 @@ "x-appwrite": { "method": "updateEmailVerification", "group": "users", - "weight": 210, + "weight": 200, "cookies": false, "type": "", "demo": "users\/update-email-verification.md", @@ -46637,7 +46673,7 @@ "x-appwrite": { "method": "updatePhoneVerification", "group": "users", - "weight": 205, + "weight": 195, "cookies": false, "type": "", "demo": "users\/update-phone-verification.md", @@ -46716,7 +46752,7 @@ "x-appwrite": { "method": "createRepositoryDetection", "group": "repositories", - "weight": 231, + "weight": 221, "cookies": false, "type": "", "demo": "vcs\/create-repository-detection.md", @@ -46811,7 +46847,7 @@ "x-appwrite": { "method": "listRepositories", "group": "repositories", - "weight": 232, + "weight": 222, "cookies": false, "type": "", "demo": "vcs\/list-repositories.md", @@ -46864,6 +46900,18 @@ "x-example": "", "default": "", "in": "query" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" } ] }, @@ -46892,7 +46940,7 @@ "x-appwrite": { "method": "createRepository", "group": "repositories", - "weight": 233, + "weight": 223, "cookies": false, "type": "", "demo": "vcs\/create-repository.md", @@ -46975,7 +47023,7 @@ "x-appwrite": { "method": "getRepository", "group": "repositories", - "weight": 234, + "weight": 224, "cookies": false, "type": "", "demo": "vcs\/get-repository.md", @@ -47041,7 +47089,7 @@ "x-appwrite": { "method": "listRepositoryBranches", "group": "repositories", - "weight": 235, + "weight": 225, "cookies": false, "type": "", "demo": "vcs\/list-repository-branches.md", @@ -47107,7 +47155,7 @@ "x-appwrite": { "method": "getRepositoryContents", "group": "repositories", - "weight": 230, + "weight": 220, "cookies": false, "type": "", "demo": "vcs\/get-repository-contents.md", @@ -47190,7 +47238,7 @@ "x-appwrite": { "method": "updateExternalDeployments", "group": "repositories", - "weight": 240, + "weight": 230, "cookies": false, "type": "", "demo": "vcs\/update-external-deployments.md", @@ -47274,7 +47322,7 @@ "x-appwrite": { "method": "listInstallations", "group": "installations", - "weight": 237, + "weight": 227, "cookies": false, "type": "", "demo": "vcs\/list-installations.md", @@ -47354,7 +47402,7 @@ "x-appwrite": { "method": "getInstallation", "group": "installations", - "weight": 238, + "weight": 228, "cookies": false, "type": "", "demo": "vcs\/get-installation.md", @@ -47407,7 +47455,7 @@ "x-appwrite": { "method": "deleteInstallation", "group": "installations", - "weight": 239, + "weight": 229, "cookies": false, "type": "", "demo": "vcs\/delete-installation.md", diff --git a/app/config/specs/swagger2-1.8.x-server.json b/app/config/specs/swagger2-1.8.x-server.json index b37aaac8e2..82fe0c6023 100644 --- a/app/config/specs/swagger2-1.8.x-server.json +++ b/app/config/specs/swagger2-1.8.x-server.json @@ -325,7 +325,7 @@ "x-appwrite": { "method": "listIdentities", "group": "identities", - "weight": 58, + "weight": 48, "cookies": false, "type": "", "demo": "account\/list-identities.md", @@ -397,7 +397,7 @@ "x-appwrite": { "method": "deleteIdentity", "group": "identities", - "weight": 59, + "weight": 49, "cookies": false, "type": "", "demo": "account\/delete-identity.md", @@ -587,7 +587,7 @@ "x-appwrite": { "method": "updateMFA", "group": "mfa", - "weight": 45, + "weight": 306, "cookies": false, "type": "", "demo": "account\/update-mfa.md", @@ -661,7 +661,7 @@ "x-appwrite": { "method": "createMfaAuthenticator", "group": "mfa", - "weight": 47, + "weight": 308, "cookies": false, "type": "", "demo": "account\/create-mfa-authenticator.md", @@ -784,7 +784,7 @@ "x-appwrite": { "method": "updateMfaAuthenticator", "group": "mfa", - "weight": 48, + "weight": 309, "cookies": false, "type": "", "demo": "account\/update-mfa-authenticator.md", @@ -924,7 +924,7 @@ "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", - "weight": 52, + "weight": 310, "cookies": false, "type": "", "demo": "account\/delete-mfa-authenticator.md", @@ -1021,7 +1021,7 @@ ] } }, - "\/account\/mfa\/challenge": { + "\/account\/mfa\/challenges": { "post": { "summary": "Create MFA challenge", "operationId": "accountCreateMfaChallenge", @@ -1047,7 +1047,7 @@ "x-appwrite": { "method": "createMfaChallenge", "group": "mfa", - "weight": 53, + "weight": 314, "cookies": false, "type": "", "demo": "account\/create-mfa-challenge.md", @@ -1178,7 +1178,7 @@ "x-appwrite": { "method": "updateMfaChallenge", "group": "mfa", - "weight": 54, + "weight": 315, "cookies": false, "type": "", "demo": "account\/update-mfa-challenge.md", @@ -1317,7 +1317,7 @@ "x-appwrite": { "method": "listMfaFactors", "group": "mfa", - "weight": 46, + "weight": 307, "cookies": false, "type": "", "demo": "account\/list-mfa-factors.md", @@ -1417,7 +1417,7 @@ "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", - "weight": 51, + "weight": 313, "cookies": false, "type": "", "demo": "account\/get-mfa-recovery-codes.md", @@ -1517,7 +1517,7 @@ "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", - "weight": 49, + "weight": 311, "cookies": false, "type": "", "demo": "account\/create-mfa-recovery-codes.md", @@ -1617,7 +1617,7 @@ "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", - "weight": 50, + "weight": 312, "cookies": false, "type": "", "demo": "account\/update-mfa-recovery-codes.md", @@ -3741,7 +3741,7 @@ "x-appwrite": { "method": "getBrowser", "group": null, - "weight": 61, + "weight": 51, "cookies": false, "type": "location", "demo": "avatars\/get-browser.md", @@ -3867,7 +3867,7 @@ "x-appwrite": { "method": "getCreditCard", "group": null, - "weight": 60, + "weight": 50, "cookies": false, "type": "location", "demo": "avatars\/get-credit-card.md", @@ -3999,7 +3999,7 @@ "x-appwrite": { "method": "getFavicon", "group": null, - "weight": 64, + "weight": 54, "cookies": false, "type": "location", "demo": "avatars\/get-favicon.md", @@ -4063,7 +4063,7 @@ "x-appwrite": { "method": "getFlag", "group": null, - "weight": 62, + "weight": 52, "cookies": false, "type": "location", "demo": "avatars\/get-flag.md", @@ -4551,7 +4551,7 @@ "x-appwrite": { "method": "getImage", "group": null, - "weight": 63, + "weight": 53, "cookies": false, "type": "location", "demo": "avatars\/get-image.md", @@ -4635,7 +4635,7 @@ "x-appwrite": { "method": "getInitials", "group": null, - "weight": 66, + "weight": 56, "cookies": false, "type": "location", "demo": "avatars\/get-initials.md", @@ -4727,7 +4727,7 @@ "x-appwrite": { "method": "getQR", "group": null, - "weight": 65, + "weight": 55, "cookies": false, "type": "location", "demo": "avatars\/get-qr.md", @@ -4819,7 +4819,7 @@ "x-appwrite": { "method": "getScreenshot", "group": null, - "weight": 67, + "weight": 57, "cookies": false, "type": "location", "demo": "avatars\/get-screenshot.md", @@ -6636,6 +6636,24 @@ "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", "default": true, "x-example": false + }, + "attributes": { + "type": "array", + "description": "Array of attribute definitions to create. Each attribute should contain: key (string), type (string: string, integer, float, boolean, datetime, relationship), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.", + "default": [], + "x-example": null, + "items": { + "type": "object" + } + }, + "indexes": { + "type": "array", + "description": "Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of attribute keys), orders (array of ASC\/DESC, optional), and lengths (array of integers, optional).", + "default": [], + "x-example": null, + "items": { + "type": "object" + } } }, "required": [ @@ -14340,7 +14358,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 251, + "weight": 241, "cookies": false, "type": "graphql", "demo": "graphql\/query.md", @@ -14415,7 +14433,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 250, + "weight": 240, "cookies": false, "type": "graphql", "demo": "graphql\/mutation.md", @@ -14488,7 +14506,7 @@ "x-appwrite": { "method": "get", "group": "health", - "weight": 79, + "weight": 69, "cookies": false, "type": "", "demo": "health\/get.md", @@ -14538,7 +14556,7 @@ "x-appwrite": { "method": "getAntivirus", "group": "health", - "weight": 100, + "weight": 90, "cookies": false, "type": "", "demo": "health\/get-antivirus.md", @@ -14588,7 +14606,7 @@ "x-appwrite": { "method": "getCache", "group": "health", - "weight": 82, + "weight": 72, "cookies": false, "type": "", "demo": "health\/get-cache.md", @@ -14638,7 +14656,7 @@ "x-appwrite": { "method": "getCertificate", "group": "health", - "weight": 87, + "weight": 77, "cookies": false, "type": "", "demo": "health\/get-certificate.md", @@ -14697,7 +14715,7 @@ "x-appwrite": { "method": "getDB", "group": "health", - "weight": 81, + "weight": 71, "cookies": false, "type": "", "demo": "health\/get-db.md", @@ -14747,7 +14765,7 @@ "x-appwrite": { "method": "getPubSub", "group": "health", - "weight": 83, + "weight": 73, "cookies": false, "type": "", "demo": "health\/get-pub-sub.md", @@ -14797,7 +14815,7 @@ "x-appwrite": { "method": "getQueueBuilds", "group": "queue", - "weight": 89, + "weight": 79, "cookies": false, "type": "", "demo": "health\/get-queue-builds.md", @@ -14858,7 +14876,7 @@ "x-appwrite": { "method": "getQueueCertificates", "group": "queue", - "weight": 88, + "weight": 78, "cookies": false, "type": "", "demo": "health\/get-queue-certificates.md", @@ -14919,7 +14937,7 @@ "x-appwrite": { "method": "getQueueDatabases", "group": "queue", - "weight": 90, + "weight": 80, "cookies": false, "type": "", "demo": "health\/get-queue-databases.md", @@ -14989,7 +15007,7 @@ "x-appwrite": { "method": "getQueueDeletes", "group": "queue", - "weight": 91, + "weight": 81, "cookies": false, "type": "", "demo": "health\/get-queue-deletes.md", @@ -15050,7 +15068,7 @@ "x-appwrite": { "method": "getFailedJobs", "group": "queue", - "weight": 101, + "weight": 91, "cookies": false, "type": "", "demo": "health\/get-failed-jobs.md", @@ -15135,7 +15153,7 @@ "x-appwrite": { "method": "getQueueFunctions", "group": "queue", - "weight": 95, + "weight": 85, "cookies": false, "type": "", "demo": "health\/get-queue-functions.md", @@ -15196,7 +15214,7 @@ "x-appwrite": { "method": "getQueueLogs", "group": "queue", - "weight": 86, + "weight": 76, "cookies": false, "type": "", "demo": "health\/get-queue-logs.md", @@ -15257,7 +15275,7 @@ "x-appwrite": { "method": "getQueueMails", "group": "queue", - "weight": 92, + "weight": 82, "cookies": false, "type": "", "demo": "health\/get-queue-mails.md", @@ -15318,7 +15336,7 @@ "x-appwrite": { "method": "getQueueMessaging", "group": "queue", - "weight": 93, + "weight": 83, "cookies": false, "type": "", "demo": "health\/get-queue-messaging.md", @@ -15379,7 +15397,7 @@ "x-appwrite": { "method": "getQueueMigrations", "group": "queue", - "weight": 94, + "weight": 84, "cookies": false, "type": "", "demo": "health\/get-queue-migrations.md", @@ -15440,7 +15458,7 @@ "x-appwrite": { "method": "getQueueStatsResources", "group": "queue", - "weight": 96, + "weight": 86, "cookies": false, "type": "", "demo": "health\/get-queue-stats-resources.md", @@ -15501,7 +15519,7 @@ "x-appwrite": { "method": "getQueueUsage", "group": "queue", - "weight": 97, + "weight": 87, "cookies": false, "type": "", "demo": "health\/get-queue-usage.md", @@ -15562,7 +15580,7 @@ "x-appwrite": { "method": "getQueueWebhooks", "group": "queue", - "weight": 85, + "weight": 75, "cookies": false, "type": "", "demo": "health\/get-queue-webhooks.md", @@ -15623,7 +15641,7 @@ "x-appwrite": { "method": "getStorage", "group": "storage", - "weight": 99, + "weight": 89, "cookies": false, "type": "", "demo": "health\/get-storage.md", @@ -15673,7 +15691,7 @@ "x-appwrite": { "method": "getStorageLocal", "group": "storage", - "weight": 98, + "weight": 88, "cookies": false, "type": "", "demo": "health\/get-storage-local.md", @@ -15723,7 +15741,7 @@ "x-appwrite": { "method": "getTime", "group": "health", - "weight": 84, + "weight": 74, "cookies": false, "type": "", "demo": "health\/get-time.md", @@ -15773,7 +15791,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 71, + "weight": 61, "cookies": false, "type": "", "demo": "locale\/get.md", @@ -15826,7 +15844,7 @@ "x-appwrite": { "method": "listCodes", "group": null, - "weight": 72, + "weight": 62, "cookies": false, "type": "", "demo": "locale\/list-codes.md", @@ -15879,7 +15897,7 @@ "x-appwrite": { "method": "listContinents", "group": null, - "weight": 76, + "weight": 66, "cookies": false, "type": "", "demo": "locale\/list-continents.md", @@ -15932,7 +15950,7 @@ "x-appwrite": { "method": "listCountries", "group": null, - "weight": 73, + "weight": 63, "cookies": false, "type": "", "demo": "locale\/list-countries.md", @@ -15985,7 +16003,7 @@ "x-appwrite": { "method": "listCountriesEU", "group": null, - "weight": 74, + "weight": 64, "cookies": false, "type": "", "demo": "locale\/list-countries-eu.md", @@ -16038,7 +16056,7 @@ "x-appwrite": { "method": "listCountriesPhones", "group": null, - "weight": 75, + "weight": 65, "cookies": false, "type": "", "demo": "locale\/list-countries-phones.md", @@ -16091,7 +16109,7 @@ "x-appwrite": { "method": "listCurrencies", "group": null, - "weight": 77, + "weight": 67, "cookies": false, "type": "", "demo": "locale\/list-currencies.md", @@ -16144,7 +16162,7 @@ "x-appwrite": { "method": "listLanguages", "group": null, - "weight": 78, + "weight": 68, "cookies": false, "type": "", "demo": "locale\/list-languages.md", @@ -16197,7 +16215,7 @@ "x-appwrite": { "method": "listMessages", "group": "messages", - "weight": 308, + "weight": 298, "cookies": false, "type": "", "demo": "messaging\/list-messages.md", @@ -16282,7 +16300,7 @@ "x-appwrite": { "method": "createEmail", "group": "messages", - "weight": 305, + "weight": 295, "cookies": false, "type": "", "demo": "messaging\/create-email.md", @@ -16442,7 +16460,7 @@ "x-appwrite": { "method": "updateEmail", "group": "messages", - "weight": 312, + "weight": 302, "cookies": false, "type": "", "demo": "messaging\/update-email.md", @@ -16609,7 +16627,7 @@ "x-appwrite": { "method": "createPush", "group": "messages", - "weight": 307, + "weight": 297, "cookies": false, "type": "", "demo": "messaging\/create-push.md", @@ -16807,7 +16825,7 @@ "x-appwrite": { "method": "updatePush", "group": "messages", - "weight": 314, + "weight": 304, "cookies": false, "type": "", "demo": "messaging\/update-push.md", @@ -17020,7 +17038,7 @@ "x-appwrite": { "method": "createSms", "group": "messages", - "weight": 306, + "weight": 296, "cookies": false, "type": "", "demo": "messaging\/create-sms.md", @@ -17210,7 +17228,7 @@ "x-appwrite": { "method": "updateSms", "group": "messages", - "weight": 313, + "weight": 303, "cookies": false, "type": "", "demo": "messaging\/update-sms.md", @@ -17399,7 +17417,7 @@ "x-appwrite": { "method": "getMessage", "group": "messages", - "weight": 311, + "weight": 301, "cookies": false, "type": "", "demo": "messaging\/get-message.md", @@ -17455,7 +17473,7 @@ "x-appwrite": { "method": "delete", "group": "messages", - "weight": 315, + "weight": 305, "cookies": false, "type": "", "demo": "messaging\/delete.md", @@ -17516,7 +17534,7 @@ "x-appwrite": { "method": "listMessageLogs", "group": "logs", - "weight": 309, + "weight": 299, "cookies": false, "type": "", "demo": "messaging\/list-message-logs.md", @@ -17598,7 +17616,7 @@ "x-appwrite": { "method": "listTargets", "group": "messages", - "weight": 310, + "weight": 300, "cookies": false, "type": "", "demo": "messaging\/list-targets.md", @@ -17680,7 +17698,7 @@ "x-appwrite": { "method": "listProviders", "group": "providers", - "weight": 279, + "weight": 269, "cookies": false, "type": "", "demo": "messaging\/list-providers.md", @@ -17765,7 +17783,7 @@ "x-appwrite": { "method": "createApnsProvider", "group": "providers", - "weight": 278, + "weight": 268, "cookies": false, "type": "", "demo": "messaging\/create-apns-provider.md", @@ -17954,7 +17972,7 @@ "x-appwrite": { "method": "updateApnsProvider", "group": "providers", - "weight": 292, + "weight": 282, "cookies": false, "type": "", "demo": "messaging\/update-apns-provider.md", @@ -18140,7 +18158,7 @@ "x-appwrite": { "method": "createFcmProvider", "group": "providers", - "weight": 277, + "weight": 267, "cookies": false, "type": "", "demo": "messaging\/create-fcm-provider.md", @@ -18298,7 +18316,7 @@ "x-appwrite": { "method": "updateFcmProvider", "group": "providers", - "weight": 291, + "weight": 281, "cookies": false, "type": "", "demo": "messaging\/update-fcm-provider.md", @@ -18452,7 +18470,7 @@ "x-appwrite": { "method": "createMailgunProvider", "group": "providers", - "weight": 268, + "weight": 258, "cookies": false, "type": "", "demo": "messaging\/create-mailgun-provider.md", @@ -18582,7 +18600,7 @@ "x-appwrite": { "method": "updateMailgunProvider", "group": "providers", - "weight": 282, + "weight": 272, "cookies": false, "type": "", "demo": "messaging\/update-mailgun-provider.md", @@ -18710,7 +18728,7 @@ "x-appwrite": { "method": "createMsg91Provider", "group": "providers", - "weight": 272, + "weight": 262, "cookies": false, "type": "", "demo": "messaging\/create-msg-91-provider.md", @@ -18815,7 +18833,7 @@ "x-appwrite": { "method": "updateMsg91Provider", "group": "providers", - "weight": 286, + "weight": 276, "cookies": false, "type": "", "demo": "messaging\/update-msg-91-provider.md", @@ -18918,7 +18936,7 @@ "x-appwrite": { "method": "createResendProvider", "group": "providers", - "weight": 270, + "weight": 260, "cookies": false, "type": "", "demo": "messaging\/create-resend-provider.md", @@ -19035,7 +19053,7 @@ "x-appwrite": { "method": "updateResendProvider", "group": "providers", - "weight": 284, + "weight": 274, "cookies": false, "type": "", "demo": "messaging\/update-resend-provider.md", @@ -19150,7 +19168,7 @@ "x-appwrite": { "method": "createSendgridProvider", "group": "providers", - "weight": 269, + "weight": 259, "cookies": false, "type": "", "demo": "messaging\/create-sendgrid-provider.md", @@ -19267,7 +19285,7 @@ "x-appwrite": { "method": "updateSendgridProvider", "group": "providers", - "weight": 283, + "weight": 273, "cookies": false, "type": "", "demo": "messaging\/update-sendgrid-provider.md", @@ -19382,7 +19400,7 @@ "x-appwrite": { "method": "createSmtpProvider", "group": "providers", - "weight": 271, + "weight": 261, "cookies": false, "type": "", "demo": "messaging\/create-smtp-provider.md", @@ -19629,7 +19647,7 @@ "x-appwrite": { "method": "updateSmtpProvider", "group": "providers", - "weight": 285, + "weight": 275, "cookies": false, "type": "", "demo": "messaging\/update-smtp-provider.md", @@ -19871,7 +19889,7 @@ "x-appwrite": { "method": "createTelesignProvider", "group": "providers", - "weight": 273, + "weight": 263, "cookies": false, "type": "", "demo": "messaging\/create-telesign-provider.md", @@ -19976,7 +19994,7 @@ "x-appwrite": { "method": "updateTelesignProvider", "group": "providers", - "weight": 287, + "weight": 277, "cookies": false, "type": "", "demo": "messaging\/update-telesign-provider.md", @@ -20079,7 +20097,7 @@ "x-appwrite": { "method": "createTextmagicProvider", "group": "providers", - "weight": 274, + "weight": 264, "cookies": false, "type": "", "demo": "messaging\/create-textmagic-provider.md", @@ -20184,7 +20202,7 @@ "x-appwrite": { "method": "updateTextmagicProvider", "group": "providers", - "weight": 288, + "weight": 278, "cookies": false, "type": "", "demo": "messaging\/update-textmagic-provider.md", @@ -20287,7 +20305,7 @@ "x-appwrite": { "method": "createTwilioProvider", "group": "providers", - "weight": 275, + "weight": 265, "cookies": false, "type": "", "demo": "messaging\/create-twilio-provider.md", @@ -20392,7 +20410,7 @@ "x-appwrite": { "method": "updateTwilioProvider", "group": "providers", - "weight": 289, + "weight": 279, "cookies": false, "type": "", "demo": "messaging\/update-twilio-provider.md", @@ -20495,7 +20513,7 @@ "x-appwrite": { "method": "createVonageProvider", "group": "providers", - "weight": 276, + "weight": 266, "cookies": false, "type": "", "demo": "messaging\/create-vonage-provider.md", @@ -20600,7 +20618,7 @@ "x-appwrite": { "method": "updateVonageProvider", "group": "providers", - "weight": 290, + "weight": 280, "cookies": false, "type": "", "demo": "messaging\/update-vonage-provider.md", @@ -20701,7 +20719,7 @@ "x-appwrite": { "method": "getProvider", "group": "providers", - "weight": 281, + "weight": 271, "cookies": false, "type": "", "demo": "messaging\/get-provider.md", @@ -20757,7 +20775,7 @@ "x-appwrite": { "method": "deleteProvider", "group": "providers", - "weight": 293, + "weight": 283, "cookies": false, "type": "", "demo": "messaging\/delete-provider.md", @@ -20818,7 +20836,7 @@ "x-appwrite": { "method": "listProviderLogs", "group": "providers", - "weight": 280, + "weight": 270, "cookies": false, "type": "", "demo": "messaging\/list-provider-logs.md", @@ -20900,7 +20918,7 @@ "x-appwrite": { "method": "listSubscriberLogs", "group": "subscribers", - "weight": 302, + "weight": 292, "cookies": false, "type": "", "demo": "messaging\/list-subscriber-logs.md", @@ -20982,7 +21000,7 @@ "x-appwrite": { "method": "listTopics", "group": "topics", - "weight": 295, + "weight": 285, "cookies": false, "type": "", "demo": "messaging\/list-topics.md", @@ -21065,7 +21083,7 @@ "x-appwrite": { "method": "createTopic", "group": "topics", - "weight": 294, + "weight": 284, "cookies": false, "type": "", "demo": "messaging\/create-topic.md", @@ -21154,7 +21172,7 @@ "x-appwrite": { "method": "getTopic", "group": "topics", - "weight": 297, + "weight": 287, "cookies": false, "type": "", "demo": "messaging\/get-topic.md", @@ -21215,7 +21233,7 @@ "x-appwrite": { "method": "updateTopic", "group": "topics", - "weight": 298, + "weight": 288, "cookies": false, "type": "", "demo": "messaging\/update-topic.md", @@ -21297,7 +21315,7 @@ "x-appwrite": { "method": "deleteTopic", "group": "topics", - "weight": 299, + "weight": 289, "cookies": false, "type": "", "demo": "messaging\/delete-topic.md", @@ -21358,7 +21376,7 @@ "x-appwrite": { "method": "listTopicLogs", "group": "topics", - "weight": 296, + "weight": 286, "cookies": false, "type": "", "demo": "messaging\/list-topic-logs.md", @@ -21440,7 +21458,7 @@ "x-appwrite": { "method": "listSubscribers", "group": "subscribers", - "weight": 301, + "weight": 291, "cookies": false, "type": "", "demo": "messaging\/list-subscribers.md", @@ -21531,7 +21549,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 300, + "weight": 290, "cookies": false, "type": "", "demo": "messaging\/create-subscriber.md", @@ -21620,7 +21638,7 @@ "x-appwrite": { "method": "getSubscriber", "group": "subscribers", - "weight": 303, + "weight": 293, "cookies": false, "type": "", "demo": "messaging\/get-subscriber.md", @@ -21684,7 +21702,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 304, + "weight": 294, "cookies": false, "type": "", "demo": "messaging\/delete-subscriber.md", @@ -24047,7 +24065,7 @@ "x-appwrite": { "method": "listBuckets", "group": "buckets", - "weight": 156, + "weight": 146, "cookies": false, "type": "", "demo": "storage\/list-buckets.md", @@ -24129,7 +24147,7 @@ "x-appwrite": { "method": "createBucket", "group": "buckets", - "weight": 155, + "weight": 145, "cookies": false, "type": "", "demo": "storage\/create-bucket.md", @@ -24274,7 +24292,7 @@ "x-appwrite": { "method": "getBucket", "group": "buckets", - "weight": 157, + "weight": 147, "cookies": false, "type": "", "demo": "storage\/get-bucket.md", @@ -24334,7 +24352,7 @@ "x-appwrite": { "method": "updateBucket", "group": "buckets", - "weight": 158, + "weight": 148, "cookies": false, "type": "", "demo": "storage\/update-bucket.md", @@ -24475,7 +24493,7 @@ "x-appwrite": { "method": "deleteBucket", "group": "buckets", - "weight": 159, + "weight": 149, "cookies": false, "type": "", "demo": "storage\/delete-bucket.md", @@ -24535,7 +24553,7 @@ "x-appwrite": { "method": "listFiles", "group": "files", - "weight": 161, + "weight": 151, "cookies": false, "type": "", "demo": "storage\/list-files.md", @@ -24628,7 +24646,7 @@ "x-appwrite": { "method": "createFile", "group": "files", - "weight": 160, + "weight": 150, "cookies": false, "type": "upload", "demo": "storage\/create-file.md", @@ -24719,7 +24737,7 @@ "x-appwrite": { "method": "getFile", "group": "files", - "weight": 162, + "weight": 152, "cookies": false, "type": "", "demo": "storage\/get-file.md", @@ -24790,7 +24808,7 @@ "x-appwrite": { "method": "updateFile", "group": "files", - "weight": 167, + "weight": 157, "cookies": false, "type": "", "demo": "storage\/update-file.md", @@ -24882,7 +24900,7 @@ "x-appwrite": { "method": "deleteFile", "group": "files", - "weight": 168, + "weight": 158, "cookies": false, "type": "", "demo": "storage\/delete-file.md", @@ -24953,7 +24971,7 @@ "x-appwrite": { "method": "getFileDownload", "group": "files", - "weight": 164, + "weight": 154, "cookies": false, "type": "location", "demo": "storage\/get-file-download.md", @@ -25033,7 +25051,7 @@ "x-appwrite": { "method": "getFilePreview", "group": "files", - "weight": 163, + "weight": 153, "cookies": false, "type": "location", "demo": "storage\/get-file-preview.md", @@ -25241,7 +25259,7 @@ "x-appwrite": { "method": "getFileView", "group": "files", - "weight": 165, + "weight": 155, "cookies": false, "type": "location", "demo": "storage\/get-file-view.md", @@ -26296,6 +26314,24 @@ "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", "default": true, "x-example": false + }, + "columns": { + "type": "array", + "description": "Array of column definitions to create. Each column should contain: key (string), type (string: string, integer, float, boolean, datetime, relationship), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.", + "default": [], + "x-example": null, + "items": { + "type": "object" + } + }, + "indexes": { + "type": "array", + "description": "Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of column keys), orders (array of ASC\/DESC, optional), and lengths (array of integers, optional).", + "default": [], + "x-example": null, + "items": { + "type": "object" + } } }, "required": [ @@ -31552,7 +31588,7 @@ "x-appwrite": { "method": "list", "group": "teams", - "weight": 172, + "weight": 162, "cookies": false, "type": "", "demo": "teams\/list.md", @@ -31637,7 +31673,7 @@ "x-appwrite": { "method": "create", "group": "teams", - "weight": 171, + "weight": 161, "cookies": false, "type": "", "demo": "teams\/create.md", @@ -31728,7 +31764,7 @@ "x-appwrite": { "method": "get", "group": "teams", - "weight": 173, + "weight": 163, "cookies": false, "type": "", "demo": "teams\/get.md", @@ -31791,7 +31827,7 @@ "x-appwrite": { "method": "updateName", "group": "teams", - "weight": 175, + "weight": 165, "cookies": false, "type": "", "demo": "teams\/update-name.md", @@ -31867,7 +31903,7 @@ "x-appwrite": { "method": "delete", "group": "teams", - "weight": 177, + "weight": 167, "cookies": false, "type": "", "demo": "teams\/delete.md", @@ -31930,7 +31966,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 179, + "weight": 169, "cookies": false, "type": "", "demo": "teams\/list-memberships.md", @@ -32023,7 +32059,7 @@ "x-appwrite": { "method": "createMembership", "group": "memberships", - "weight": 178, + "weight": 168, "cookies": false, "type": "", "demo": "teams\/create-membership.md", @@ -32137,7 +32173,7 @@ "x-appwrite": { "method": "getMembership", "group": "memberships", - "weight": 180, + "weight": 170, "cookies": false, "type": "", "demo": "teams\/get-membership.md", @@ -32208,7 +32244,7 @@ "x-appwrite": { "method": "updateMembership", "group": "memberships", - "weight": 181, + "weight": 171, "cookies": false, "type": "", "demo": "teams\/update-membership.md", @@ -32295,7 +32331,7 @@ "x-appwrite": { "method": "deleteMembership", "group": "memberships", - "weight": 183, + "weight": 173, "cookies": false, "type": "", "demo": "teams\/delete-membership.md", @@ -32368,7 +32404,7 @@ "x-appwrite": { "method": "updateMembershipStatus", "group": "memberships", - "weight": 182, + "weight": 172, "cookies": false, "type": "", "demo": "teams\/update-membership-status.md", @@ -32463,7 +32499,7 @@ "x-appwrite": { "method": "getPrefs", "group": "teams", - "weight": 174, + "weight": 164, "cookies": false, "type": "", "demo": "teams\/get-prefs.md", @@ -32525,7 +32561,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "teams", - "weight": 176, + "weight": 166, "cookies": false, "type": "", "demo": "teams\/update-prefs.md", @@ -32974,7 +33010,7 @@ "x-appwrite": { "method": "list", "group": "users", - "weight": 194, + "weight": 184, "cookies": false, "type": "", "demo": "users\/list.md", @@ -33056,7 +33092,7 @@ "x-appwrite": { "method": "create", "group": "users", - "weight": 185, + "weight": 175, "cookies": false, "type": "", "demo": "users\/create.md", @@ -33154,7 +33190,7 @@ "x-appwrite": { "method": "createArgon2User", "group": "users", - "weight": 188, + "weight": 178, "cookies": false, "type": "", "demo": "users\/create-argon-2-user.md", @@ -33246,7 +33282,7 @@ "x-appwrite": { "method": "createBcryptUser", "group": "users", - "weight": 186, + "weight": 176, "cookies": false, "type": "", "demo": "users\/create-bcrypt-user.md", @@ -33336,7 +33372,7 @@ "x-appwrite": { "method": "listIdentities", "group": "identities", - "weight": 202, + "weight": 192, "cookies": false, "type": "", "demo": "users\/list-identities.md", @@ -33415,7 +33451,7 @@ "x-appwrite": { "method": "deleteIdentity", "group": "identities", - "weight": 225, + "weight": 215, "cookies": false, "type": "", "demo": "users\/delete-identity.md", @@ -33477,7 +33513,7 @@ "x-appwrite": { "method": "createMD5User", "group": "users", - "weight": 187, + "weight": 177, "cookies": false, "type": "", "demo": "users\/create-md-5-user.md", @@ -33569,7 +33605,7 @@ "x-appwrite": { "method": "createPHPassUser", "group": "users", - "weight": 190, + "weight": 180, "cookies": false, "type": "", "demo": "users\/create-ph-pass-user.md", @@ -33661,7 +33697,7 @@ "x-appwrite": { "method": "createScryptUser", "group": "users", - "weight": 191, + "weight": 181, "cookies": false, "type": "", "demo": "users\/create-scrypt-user.md", @@ -33788,7 +33824,7 @@ "x-appwrite": { "method": "createScryptModifiedUser", "group": "users", - "weight": 192, + "weight": 182, "cookies": false, "type": "", "demo": "users\/create-scrypt-modified-user.md", @@ -33901,7 +33937,7 @@ "x-appwrite": { "method": "createSHAUser", "group": "users", - "weight": 189, + "weight": 179, "cookies": false, "type": "", "demo": "users\/create-sha-user.md", @@ -34012,7 +34048,7 @@ "x-appwrite": { "method": "get", "group": "users", - "weight": 195, + "weight": 185, "cookies": false, "type": "", "demo": "users\/get.md", @@ -34067,7 +34103,7 @@ "x-appwrite": { "method": "delete", "group": "users", - "weight": 223, + "weight": 213, "cookies": false, "type": "", "demo": "users\/delete.md", @@ -34129,7 +34165,7 @@ "x-appwrite": { "method": "updateEmail", "group": "users", - "weight": 208, + "weight": 198, "cookies": false, "type": "", "demo": "users\/update-email.md", @@ -34209,7 +34245,7 @@ "x-appwrite": { "method": "createJWT", "group": "sessions", - "weight": 226, + "weight": 216, "cookies": false, "type": "", "demo": "users\/create-jwt.md", @@ -34292,7 +34328,7 @@ "x-appwrite": { "method": "updateLabels", "group": "users", - "weight": 204, + "weight": 194, "cookies": false, "type": "", "demo": "users\/update-labels.md", @@ -34373,7 +34409,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 200, + "weight": 190, "cookies": false, "type": "", "demo": "users\/list-logs.md", @@ -34454,7 +34490,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 199, + "weight": 189, "cookies": false, "type": "", "demo": "users\/list-memberships.md", @@ -34546,7 +34582,7 @@ "x-appwrite": { "method": "updateMfa", "group": "users", - "weight": 213, + "weight": 203, "cookies": false, "type": "", "demo": "users\/update-mfa.md", @@ -34681,7 +34717,7 @@ "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", - "weight": 218, + "weight": 208, "cookies": false, "type": "", "demo": "users\/delete-mfa-authenticator.md", @@ -34812,7 +34848,7 @@ "x-appwrite": { "method": "listMfaFactors", "group": "mfa", - "weight": 214, + "weight": 204, "cookies": false, "type": "", "demo": "users\/list-mfa-factors.md", @@ -34928,7 +34964,7 @@ "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", - "weight": 215, + "weight": 205, "cookies": false, "type": "", "demo": "users\/get-mfa-recovery-codes.md", @@ -35044,7 +35080,7 @@ "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", - "weight": 217, + "weight": 207, "cookies": false, "type": "", "demo": "users\/update-mfa-recovery-codes.md", @@ -35160,7 +35196,7 @@ "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", - "weight": 216, + "weight": 206, "cookies": false, "type": "", "demo": "users\/create-mfa-recovery-codes.md", @@ -35278,7 +35314,7 @@ "x-appwrite": { "method": "updateName", "group": "users", - "weight": 206, + "weight": 196, "cookies": false, "type": "", "demo": "users\/update-name.md", @@ -35358,7 +35394,7 @@ "x-appwrite": { "method": "updatePassword", "group": "users", - "weight": 207, + "weight": 197, "cookies": false, "type": "", "demo": "users\/update-password.md", @@ -35438,7 +35474,7 @@ "x-appwrite": { "method": "updatePhone", "group": "users", - "weight": 209, + "weight": 199, "cookies": false, "type": "", "demo": "users\/update-phone.md", @@ -35516,7 +35552,7 @@ "x-appwrite": { "method": "getPrefs", "group": "users", - "weight": 196, + "weight": 186, "cookies": false, "type": "", "demo": "users\/get-prefs.md", @@ -35576,7 +35612,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "users", - "weight": 211, + "weight": 201, "cookies": false, "type": "", "demo": "users\/update-prefs.md", @@ -35654,7 +35690,7 @@ "x-appwrite": { "method": "listSessions", "group": "sessions", - "weight": 198, + "weight": 188, "cookies": false, "type": "", "demo": "users\/list-sessions.md", @@ -35723,7 +35759,7 @@ "x-appwrite": { "method": "createSession", "group": "sessions", - "weight": 219, + "weight": 209, "cookies": false, "type": "", "demo": "users\/create-session.md", @@ -35778,7 +35814,7 @@ "x-appwrite": { "method": "deleteSessions", "group": "sessions", - "weight": 222, + "weight": 212, "cookies": false, "type": "", "demo": "users\/delete-sessions.md", @@ -35835,7 +35871,7 @@ "x-appwrite": { "method": "deleteSession", "group": "sessions", - "weight": 221, + "weight": 211, "cookies": false, "type": "", "demo": "users\/delete-session.md", @@ -35905,7 +35941,7 @@ "x-appwrite": { "method": "updateStatus", "group": "users", - "weight": 203, + "weight": 193, "cookies": false, "type": "", "demo": "users\/update-status.md", @@ -35983,7 +36019,7 @@ "x-appwrite": { "method": "listTargets", "group": "targets", - "weight": 201, + "weight": 191, "cookies": false, "type": "", "demo": "users\/list-targets.md", @@ -36065,7 +36101,7 @@ "x-appwrite": { "method": "createTarget", "group": "targets", - "weight": 193, + "weight": 183, "cookies": false, "type": "", "demo": "users\/create-target.md", @@ -36177,7 +36213,7 @@ "x-appwrite": { "method": "getTarget", "group": "targets", - "weight": 197, + "weight": 187, "cookies": false, "type": "", "demo": "users\/get-target.md", @@ -36246,7 +36282,7 @@ "x-appwrite": { "method": "updateTarget", "group": "targets", - "weight": 212, + "weight": 202, "cookies": false, "type": "", "demo": "users\/update-target.md", @@ -36337,7 +36373,7 @@ "x-appwrite": { "method": "deleteTarget", "group": "targets", - "weight": 224, + "weight": 214, "cookies": false, "type": "", "demo": "users\/delete-target.md", @@ -36408,7 +36444,7 @@ "x-appwrite": { "method": "createToken", "group": "sessions", - "weight": 220, + "weight": 210, "cookies": false, "type": "", "demo": "users\/create-token.md", @@ -36491,7 +36527,7 @@ "x-appwrite": { "method": "updateEmailVerification", "group": "users", - "weight": 210, + "weight": 200, "cookies": false, "type": "", "demo": "users\/update-email-verification.md", @@ -36571,7 +36607,7 @@ "x-appwrite": { "method": "updatePhoneVerification", "group": "users", - "weight": 205, + "weight": 195, "cookies": false, "type": "", "demo": "users\/update-phone-verification.md", diff --git a/app/config/specs/swagger2-latest-client.json b/app/config/specs/swagger2-latest-client.json index 1594f816ef..14010ee1f9 100644 --- a/app/config/specs/swagger2-latest-client.json +++ b/app/config/specs/swagger2-latest-client.json @@ -314,7 +314,7 @@ "x-appwrite": { "method": "listIdentities", "group": "identities", - "weight": 58, + "weight": 48, "cookies": false, "type": "", "demo": "account\/list-identities.md", @@ -385,7 +385,7 @@ "x-appwrite": { "method": "deleteIdentity", "group": "identities", - "weight": 59, + "weight": 49, "cookies": false, "type": "", "demo": "account\/delete-identity.md", @@ -573,7 +573,7 @@ "x-appwrite": { "method": "updateMFA", "group": "mfa", - "weight": 45, + "weight": 306, "cookies": false, "type": "", "demo": "account\/update-mfa.md", @@ -646,7 +646,7 @@ "x-appwrite": { "method": "createMfaAuthenticator", "group": "mfa", - "weight": 47, + "weight": 308, "cookies": false, "type": "", "demo": "account\/create-mfa-authenticator.md", @@ -766,7 +766,7 @@ "x-appwrite": { "method": "updateMfaAuthenticator", "group": "mfa", - "weight": 48, + "weight": 309, "cookies": false, "type": "", "demo": "account\/update-mfa-authenticator.md", @@ -903,7 +903,7 @@ "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", - "weight": 52, + "weight": 310, "cookies": false, "type": "", "demo": "account\/delete-mfa-authenticator.md", @@ -997,7 +997,7 @@ ] } }, - "\/account\/mfa\/challenge": { + "\/account\/mfa\/challenges": { "post": { "summary": "Create MFA challenge", "operationId": "accountCreateMfaChallenge", @@ -1023,7 +1023,7 @@ "x-appwrite": { "method": "createMfaChallenge", "group": "mfa", - "weight": 53, + "weight": 314, "cookies": false, "type": "", "demo": "account\/create-mfa-challenge.md", @@ -1154,7 +1154,7 @@ "x-appwrite": { "method": "updateMfaChallenge", "group": "mfa", - "weight": 54, + "weight": 315, "cookies": false, "type": "", "demo": "account\/update-mfa-challenge.md", @@ -1290,7 +1290,7 @@ "x-appwrite": { "method": "listMfaFactors", "group": "mfa", - "weight": 46, + "weight": 307, "cookies": false, "type": "", "demo": "account\/list-mfa-factors.md", @@ -1387,7 +1387,7 @@ "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", - "weight": 51, + "weight": 313, "cookies": false, "type": "", "demo": "account\/get-mfa-recovery-codes.md", @@ -1484,7 +1484,7 @@ "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", - "weight": 49, + "weight": 311, "cookies": false, "type": "", "demo": "account\/create-mfa-recovery-codes.md", @@ -1581,7 +1581,7 @@ "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", - "weight": 50, + "weight": 312, "cookies": false, "type": "", "demo": "account\/update-mfa-recovery-codes.md", @@ -3033,7 +3033,7 @@ "x-appwrite": { "method": "createPushTarget", "group": "pushTargets", - "weight": 55, + "weight": 45, "cookies": false, "type": "", "demo": "account\/create-push-target.md", @@ -3117,7 +3117,7 @@ "x-appwrite": { "method": "updatePushTarget", "group": "pushTargets", - "weight": 56, + "weight": 46, "cookies": false, "type": "", "demo": "account\/update-push-target.md", @@ -3189,7 +3189,7 @@ "x-appwrite": { "method": "deletePushTarget", "group": "pushTargets", - "weight": 57, + "weight": 47, "cookies": false, "type": "", "demo": "account\/delete-push-target.md", @@ -4030,7 +4030,7 @@ "x-appwrite": { "method": "getBrowser", "group": null, - "weight": 61, + "weight": 51, "cookies": false, "type": "location", "demo": "avatars\/get-browser.md", @@ -4154,7 +4154,7 @@ "x-appwrite": { "method": "getCreditCard", "group": null, - "weight": 60, + "weight": 50, "cookies": false, "type": "location", "demo": "avatars\/get-credit-card.md", @@ -4284,7 +4284,7 @@ "x-appwrite": { "method": "getFavicon", "group": null, - "weight": 64, + "weight": 54, "cookies": false, "type": "location", "demo": "avatars\/get-favicon.md", @@ -4346,7 +4346,7 @@ "x-appwrite": { "method": "getFlag", "group": null, - "weight": 62, + "weight": 52, "cookies": false, "type": "location", "demo": "avatars\/get-flag.md", @@ -4832,7 +4832,7 @@ "x-appwrite": { "method": "getImage", "group": null, - "weight": 63, + "weight": 53, "cookies": false, "type": "location", "demo": "avatars\/get-image.md", @@ -4914,7 +4914,7 @@ "x-appwrite": { "method": "getInitials", "group": null, - "weight": 66, + "weight": 56, "cookies": false, "type": "location", "demo": "avatars\/get-initials.md", @@ -5004,7 +5004,7 @@ "x-appwrite": { "method": "getQR", "group": null, - "weight": 65, + "weight": 55, "cookies": false, "type": "location", "demo": "avatars\/get-qr.md", @@ -5094,7 +5094,7 @@ "x-appwrite": { "method": "getScreenshot", "group": null, - "weight": 67, + "weight": 57, "cookies": false, "type": "location", "demo": "avatars\/get-screenshot.md", @@ -7420,7 +7420,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 251, + "weight": 241, "cookies": false, "type": "graphql", "demo": "graphql\/query.md", @@ -7493,7 +7493,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 250, + "weight": 240, "cookies": false, "type": "graphql", "demo": "graphql\/mutation.md", @@ -7564,7 +7564,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 71, + "weight": 61, "cookies": false, "type": "", "demo": "locale\/get.md", @@ -7615,7 +7615,7 @@ "x-appwrite": { "method": "listCodes", "group": null, - "weight": 72, + "weight": 62, "cookies": false, "type": "", "demo": "locale\/list-codes.md", @@ -7666,7 +7666,7 @@ "x-appwrite": { "method": "listContinents", "group": null, - "weight": 76, + "weight": 66, "cookies": false, "type": "", "demo": "locale\/list-continents.md", @@ -7717,7 +7717,7 @@ "x-appwrite": { "method": "listCountries", "group": null, - "weight": 73, + "weight": 63, "cookies": false, "type": "", "demo": "locale\/list-countries.md", @@ -7768,7 +7768,7 @@ "x-appwrite": { "method": "listCountriesEU", "group": null, - "weight": 74, + "weight": 64, "cookies": false, "type": "", "demo": "locale\/list-countries-eu.md", @@ -7819,7 +7819,7 @@ "x-appwrite": { "method": "listCountriesPhones", "group": null, - "weight": 75, + "weight": 65, "cookies": false, "type": "", "demo": "locale\/list-countries-phones.md", @@ -7870,7 +7870,7 @@ "x-appwrite": { "method": "listCurrencies", "group": null, - "weight": 77, + "weight": 67, "cookies": false, "type": "", "demo": "locale\/list-currencies.md", @@ -7921,7 +7921,7 @@ "x-appwrite": { "method": "listLanguages", "group": null, - "weight": 78, + "weight": 68, "cookies": false, "type": "", "demo": "locale\/list-languages.md", @@ -7974,7 +7974,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 300, + "weight": 290, "cookies": false, "type": "", "demo": "messaging\/create-subscriber.md", @@ -8058,7 +8058,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 304, + "weight": 294, "cookies": false, "type": "", "demo": "messaging\/delete-subscriber.md", @@ -8128,7 +8128,7 @@ "x-appwrite": { "method": "listFiles", "group": "files", - "weight": 161, + "weight": 151, "cookies": false, "type": "", "demo": "storage\/list-files.md", @@ -8219,7 +8219,7 @@ "x-appwrite": { "method": "createFile", "group": "files", - "weight": 160, + "weight": 150, "cookies": false, "type": "upload", "demo": "storage\/create-file.md", @@ -8308,7 +8308,7 @@ "x-appwrite": { "method": "getFile", "group": "files", - "weight": 162, + "weight": 152, "cookies": false, "type": "", "demo": "storage\/get-file.md", @@ -8377,7 +8377,7 @@ "x-appwrite": { "method": "updateFile", "group": "files", - "weight": 167, + "weight": 157, "cookies": false, "type": "", "demo": "storage\/update-file.md", @@ -8467,7 +8467,7 @@ "x-appwrite": { "method": "deleteFile", "group": "files", - "weight": 168, + "weight": 158, "cookies": false, "type": "", "demo": "storage\/delete-file.md", @@ -8536,7 +8536,7 @@ "x-appwrite": { "method": "getFileDownload", "group": "files", - "weight": 164, + "weight": 154, "cookies": false, "type": "location", "demo": "storage\/get-file-download.md", @@ -8614,7 +8614,7 @@ "x-appwrite": { "method": "getFilePreview", "group": "files", - "weight": 163, + "weight": 153, "cookies": false, "type": "location", "demo": "storage\/get-file-preview.md", @@ -8820,7 +8820,7 @@ "x-appwrite": { "method": "getFileView", "group": "files", - "weight": 165, + "weight": 155, "cookies": false, "type": "location", "demo": "storage\/get-file-view.md", @@ -10265,7 +10265,7 @@ "x-appwrite": { "method": "list", "group": "teams", - "weight": 172, + "weight": 162, "cookies": false, "type": "", "demo": "teams\/list.md", @@ -10348,7 +10348,7 @@ "x-appwrite": { "method": "create", "group": "teams", - "weight": 171, + "weight": 161, "cookies": false, "type": "", "demo": "teams\/create.md", @@ -10437,7 +10437,7 @@ "x-appwrite": { "method": "get", "group": "teams", - "weight": 173, + "weight": 163, "cookies": false, "type": "", "demo": "teams\/get.md", @@ -10498,7 +10498,7 @@ "x-appwrite": { "method": "updateName", "group": "teams", - "weight": 175, + "weight": 165, "cookies": false, "type": "", "demo": "teams\/update-name.md", @@ -10572,7 +10572,7 @@ "x-appwrite": { "method": "delete", "group": "teams", - "weight": 177, + "weight": 167, "cookies": false, "type": "", "demo": "teams\/delete.md", @@ -10633,7 +10633,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 179, + "weight": 169, "cookies": false, "type": "", "demo": "teams\/list-memberships.md", @@ -10724,7 +10724,7 @@ "x-appwrite": { "method": "createMembership", "group": "memberships", - "weight": 178, + "weight": 168, "cookies": false, "type": "", "demo": "teams\/create-membership.md", @@ -10836,7 +10836,7 @@ "x-appwrite": { "method": "getMembership", "group": "memberships", - "weight": 180, + "weight": 170, "cookies": false, "type": "", "demo": "teams\/get-membership.md", @@ -10905,7 +10905,7 @@ "x-appwrite": { "method": "updateMembership", "group": "memberships", - "weight": 181, + "weight": 171, "cookies": false, "type": "", "demo": "teams\/update-membership.md", @@ -10990,7 +10990,7 @@ "x-appwrite": { "method": "deleteMembership", "group": "memberships", - "weight": 183, + "weight": 173, "cookies": false, "type": "", "demo": "teams\/delete-membership.md", @@ -11061,7 +11061,7 @@ "x-appwrite": { "method": "updateMembershipStatus", "group": "memberships", - "weight": 182, + "weight": 172, "cookies": false, "type": "", "demo": "teams\/update-membership-status.md", @@ -11155,7 +11155,7 @@ "x-appwrite": { "method": "getPrefs", "group": "teams", - "weight": 174, + "weight": 164, "cookies": false, "type": "", "demo": "teams\/get-prefs.md", @@ -11216,7 +11216,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "teams", - "weight": 176, + "weight": 166, "cookies": false, "type": "", "demo": "teams\/update-prefs.md", diff --git a/app/config/specs/swagger2-latest-console.json b/app/config/specs/swagger2-latest-console.json index 5d2334764e..2457324a4a 100644 --- a/app/config/specs/swagger2-latest-console.json +++ b/app/config/specs/swagger2-latest-console.json @@ -361,7 +361,7 @@ "x-appwrite": { "method": "listIdentities", "group": "identities", - "weight": 58, + "weight": 48, "cookies": false, "type": "", "demo": "account\/list-identities.md", @@ -431,7 +431,7 @@ "x-appwrite": { "method": "deleteIdentity", "group": "identities", - "weight": 59, + "weight": 49, "cookies": false, "type": "", "demo": "account\/delete-identity.md", @@ -617,7 +617,7 @@ "x-appwrite": { "method": "updateMFA", "group": "mfa", - "weight": 45, + "weight": 306, "cookies": false, "type": "", "demo": "account\/update-mfa.md", @@ -689,7 +689,7 @@ "x-appwrite": { "method": "createMfaAuthenticator", "group": "mfa", - "weight": 47, + "weight": 308, "cookies": false, "type": "", "demo": "account\/create-mfa-authenticator.md", @@ -808,7 +808,7 @@ "x-appwrite": { "method": "updateMfaAuthenticator", "group": "mfa", - "weight": 48, + "weight": 309, "cookies": false, "type": "", "demo": "account\/update-mfa-authenticator.md", @@ -944,7 +944,7 @@ "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", - "weight": 52, + "weight": 310, "cookies": false, "type": "", "demo": "account\/delete-mfa-authenticator.md", @@ -1037,7 +1037,7 @@ ] } }, - "\/account\/mfa\/challenge": { + "\/account\/mfa\/challenges": { "post": { "summary": "Create MFA challenge", "operationId": "accountCreateMfaChallenge", @@ -1063,7 +1063,7 @@ "x-appwrite": { "method": "createMfaChallenge", "group": "mfa", - "weight": 53, + "weight": 314, "cookies": false, "type": "", "demo": "account\/create-mfa-challenge.md", @@ -1194,7 +1194,7 @@ "x-appwrite": { "method": "updateMfaChallenge", "group": "mfa", - "weight": 54, + "weight": 315, "cookies": false, "type": "", "demo": "account\/update-mfa-challenge.md", @@ -1329,7 +1329,7 @@ "x-appwrite": { "method": "listMfaFactors", "group": "mfa", - "weight": 46, + "weight": 307, "cookies": false, "type": "", "demo": "account\/list-mfa-factors.md", @@ -1425,7 +1425,7 @@ "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", - "weight": 51, + "weight": 313, "cookies": false, "type": "", "demo": "account\/get-mfa-recovery-codes.md", @@ -1521,7 +1521,7 @@ "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", - "weight": 49, + "weight": 311, "cookies": false, "type": "", "demo": "account\/create-mfa-recovery-codes.md", @@ -1617,7 +1617,7 @@ "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", - "weight": 50, + "weight": 312, "cookies": false, "type": "", "demo": "account\/update-mfa-recovery-codes.md", @@ -3055,7 +3055,7 @@ "x-appwrite": { "method": "createPushTarget", "group": "pushTargets", - "weight": 55, + "weight": 45, "cookies": false, "type": "", "demo": "account\/create-push-target.md", @@ -3138,7 +3138,7 @@ "x-appwrite": { "method": "updatePushTarget", "group": "pushTargets", - "weight": 56, + "weight": 46, "cookies": false, "type": "", "demo": "account\/update-push-target.md", @@ -3209,7 +3209,7 @@ "x-appwrite": { "method": "deletePushTarget", "group": "pushTargets", - "weight": 57, + "weight": 47, "cookies": false, "type": "", "demo": "account\/delete-push-target.md", @@ -4045,7 +4045,7 @@ "x-appwrite": { "method": "getBrowser", "group": null, - "weight": 61, + "weight": 51, "cookies": false, "type": "location", "demo": "avatars\/get-browser.md", @@ -4169,7 +4169,7 @@ "x-appwrite": { "method": "getCreditCard", "group": null, - "weight": 60, + "weight": 50, "cookies": false, "type": "location", "demo": "avatars\/get-credit-card.md", @@ -4299,7 +4299,7 @@ "x-appwrite": { "method": "getFavicon", "group": null, - "weight": 64, + "weight": 54, "cookies": false, "type": "location", "demo": "avatars\/get-favicon.md", @@ -4361,7 +4361,7 @@ "x-appwrite": { "method": "getFlag", "group": null, - "weight": 62, + "weight": 52, "cookies": false, "type": "location", "demo": "avatars\/get-flag.md", @@ -4847,7 +4847,7 @@ "x-appwrite": { "method": "getImage", "group": null, - "weight": 63, + "weight": 53, "cookies": false, "type": "location", "demo": "avatars\/get-image.md", @@ -4929,7 +4929,7 @@ "x-appwrite": { "method": "getInitials", "group": null, - "weight": 66, + "weight": 56, "cookies": false, "type": "location", "demo": "avatars\/get-initials.md", @@ -5019,7 +5019,7 @@ "x-appwrite": { "method": "getQR", "group": null, - "weight": 65, + "weight": 55, "cookies": false, "type": "location", "demo": "avatars\/get-qr.md", @@ -5109,7 +5109,7 @@ "x-appwrite": { "method": "getScreenshot", "group": null, - "weight": 67, + "weight": 57, "cookies": false, "type": "location", "demo": "avatars\/get-screenshot.md", @@ -5797,7 +5797,7 @@ "x-appwrite": { "method": "chat", "group": "console", - "weight": 253, + "weight": 243, "cookies": false, "type": "", "demo": "assistant\/chat.md", @@ -5931,7 +5931,7 @@ "x-appwrite": { "method": "variables", "group": "console", - "weight": 252, + "weight": 242, "cookies": false, "type": "", "demo": "console\/variables.md", @@ -7184,6 +7184,24 @@ "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", "default": true, "x-example": false + }, + "attributes": { + "type": "array", + "description": "Array of attribute definitions to create. Each attribute should contain: key (string), type (string: string, integer, float, boolean, datetime, relationship), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.", + "default": [], + "x-example": null, + "items": { + "type": "object" + } + }, + "indexes": { + "type": "array", + "description": "Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of attribute keys), orders (array of ASC\/DESC, optional), and lengths (array of integers, optional).", + "default": [], + "x-example": null, + "items": { + "type": "object" + } } }, "required": [ @@ -15585,7 +15603,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 251, + "weight": 241, "cookies": false, "type": "graphql", "demo": "graphql\/query.md", @@ -15658,7 +15676,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 250, + "weight": 240, "cookies": false, "type": "graphql", "demo": "graphql\/mutation.md", @@ -15729,7 +15747,7 @@ "x-appwrite": { "method": "get", "group": "health", - "weight": 79, + "weight": 69, "cookies": false, "type": "", "demo": "health\/get.md", @@ -15778,7 +15796,7 @@ "x-appwrite": { "method": "getAntivirus", "group": "health", - "weight": 100, + "weight": 90, "cookies": false, "type": "", "demo": "health\/get-antivirus.md", @@ -15827,7 +15845,7 @@ "x-appwrite": { "method": "getCache", "group": "health", - "weight": 82, + "weight": 72, "cookies": false, "type": "", "demo": "health\/get-cache.md", @@ -15876,7 +15894,7 @@ "x-appwrite": { "method": "getCertificate", "group": "health", - "weight": 87, + "weight": 77, "cookies": false, "type": "", "demo": "health\/get-certificate.md", @@ -15934,7 +15952,7 @@ "x-appwrite": { "method": "getDB", "group": "health", - "weight": 81, + "weight": 71, "cookies": false, "type": "", "demo": "health\/get-db.md", @@ -15983,7 +16001,7 @@ "x-appwrite": { "method": "getPubSub", "group": "health", - "weight": 83, + "weight": 73, "cookies": false, "type": "", "demo": "health\/get-pub-sub.md", @@ -16032,7 +16050,7 @@ "x-appwrite": { "method": "getQueueBuilds", "group": "queue", - "weight": 89, + "weight": 79, "cookies": false, "type": "", "demo": "health\/get-queue-builds.md", @@ -16092,7 +16110,7 @@ "x-appwrite": { "method": "getQueueCertificates", "group": "queue", - "weight": 88, + "weight": 78, "cookies": false, "type": "", "demo": "health\/get-queue-certificates.md", @@ -16152,7 +16170,7 @@ "x-appwrite": { "method": "getQueueDatabases", "group": "queue", - "weight": 90, + "weight": 80, "cookies": false, "type": "", "demo": "health\/get-queue-databases.md", @@ -16221,7 +16239,7 @@ "x-appwrite": { "method": "getQueueDeletes", "group": "queue", - "weight": 91, + "weight": 81, "cookies": false, "type": "", "demo": "health\/get-queue-deletes.md", @@ -16281,7 +16299,7 @@ "x-appwrite": { "method": "getFailedJobs", "group": "queue", - "weight": 101, + "weight": 91, "cookies": false, "type": "", "demo": "health\/get-failed-jobs.md", @@ -16365,7 +16383,7 @@ "x-appwrite": { "method": "getQueueFunctions", "group": "queue", - "weight": 95, + "weight": 85, "cookies": false, "type": "", "demo": "health\/get-queue-functions.md", @@ -16425,7 +16443,7 @@ "x-appwrite": { "method": "getQueueLogs", "group": "queue", - "weight": 86, + "weight": 76, "cookies": false, "type": "", "demo": "health\/get-queue-logs.md", @@ -16485,7 +16503,7 @@ "x-appwrite": { "method": "getQueueMails", "group": "queue", - "weight": 92, + "weight": 82, "cookies": false, "type": "", "demo": "health\/get-queue-mails.md", @@ -16545,7 +16563,7 @@ "x-appwrite": { "method": "getQueueMessaging", "group": "queue", - "weight": 93, + "weight": 83, "cookies": false, "type": "", "demo": "health\/get-queue-messaging.md", @@ -16605,7 +16623,7 @@ "x-appwrite": { "method": "getQueueMigrations", "group": "queue", - "weight": 94, + "weight": 84, "cookies": false, "type": "", "demo": "health\/get-queue-migrations.md", @@ -16665,7 +16683,7 @@ "x-appwrite": { "method": "getQueueStatsResources", "group": "queue", - "weight": 96, + "weight": 86, "cookies": false, "type": "", "demo": "health\/get-queue-stats-resources.md", @@ -16725,7 +16743,7 @@ "x-appwrite": { "method": "getQueueUsage", "group": "queue", - "weight": 97, + "weight": 87, "cookies": false, "type": "", "demo": "health\/get-queue-usage.md", @@ -16785,7 +16803,7 @@ "x-appwrite": { "method": "getQueueWebhooks", "group": "queue", - "weight": 85, + "weight": 75, "cookies": false, "type": "", "demo": "health\/get-queue-webhooks.md", @@ -16845,7 +16863,7 @@ "x-appwrite": { "method": "getStorage", "group": "storage", - "weight": 99, + "weight": 89, "cookies": false, "type": "", "demo": "health\/get-storage.md", @@ -16894,7 +16912,7 @@ "x-appwrite": { "method": "getStorageLocal", "group": "storage", - "weight": 98, + "weight": 88, "cookies": false, "type": "", "demo": "health\/get-storage-local.md", @@ -16943,7 +16961,7 @@ "x-appwrite": { "method": "getTime", "group": "health", - "weight": 84, + "weight": 74, "cookies": false, "type": "", "demo": "health\/get-time.md", @@ -16992,7 +17010,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 71, + "weight": 61, "cookies": false, "type": "", "demo": "locale\/get.md", @@ -17043,7 +17061,7 @@ "x-appwrite": { "method": "listCodes", "group": null, - "weight": 72, + "weight": 62, "cookies": false, "type": "", "demo": "locale\/list-codes.md", @@ -17094,7 +17112,7 @@ "x-appwrite": { "method": "listContinents", "group": null, - "weight": 76, + "weight": 66, "cookies": false, "type": "", "demo": "locale\/list-continents.md", @@ -17145,7 +17163,7 @@ "x-appwrite": { "method": "listCountries", "group": null, - "weight": 73, + "weight": 63, "cookies": false, "type": "", "demo": "locale\/list-countries.md", @@ -17196,7 +17214,7 @@ "x-appwrite": { "method": "listCountriesEU", "group": null, - "weight": 74, + "weight": 64, "cookies": false, "type": "", "demo": "locale\/list-countries-eu.md", @@ -17247,7 +17265,7 @@ "x-appwrite": { "method": "listCountriesPhones", "group": null, - "weight": 75, + "weight": 65, "cookies": false, "type": "", "demo": "locale\/list-countries-phones.md", @@ -17298,7 +17316,7 @@ "x-appwrite": { "method": "listCurrencies", "group": null, - "weight": 77, + "weight": 67, "cookies": false, "type": "", "demo": "locale\/list-currencies.md", @@ -17349,7 +17367,7 @@ "x-appwrite": { "method": "listLanguages", "group": null, - "weight": 78, + "weight": 68, "cookies": false, "type": "", "demo": "locale\/list-languages.md", @@ -17400,7 +17418,7 @@ "x-appwrite": { "method": "listMessages", "group": "messages", - "weight": 308, + "weight": 298, "cookies": false, "type": "", "demo": "messaging\/list-messages.md", @@ -17484,7 +17502,7 @@ "x-appwrite": { "method": "createEmail", "group": "messages", - "weight": 305, + "weight": 295, "cookies": false, "type": "", "demo": "messaging\/create-email.md", @@ -17643,7 +17661,7 @@ "x-appwrite": { "method": "updateEmail", "group": "messages", - "weight": 312, + "weight": 302, "cookies": false, "type": "", "demo": "messaging\/update-email.md", @@ -17809,7 +17827,7 @@ "x-appwrite": { "method": "createPush", "group": "messages", - "weight": 307, + "weight": 297, "cookies": false, "type": "", "demo": "messaging\/create-push.md", @@ -18006,7 +18024,7 @@ "x-appwrite": { "method": "updatePush", "group": "messages", - "weight": 314, + "weight": 304, "cookies": false, "type": "", "demo": "messaging\/update-push.md", @@ -18218,7 +18236,7 @@ "x-appwrite": { "method": "createSms", "group": "messages", - "weight": 306, + "weight": 296, "cookies": false, "type": "", "demo": "messaging\/create-sms.md", @@ -18405,7 +18423,7 @@ "x-appwrite": { "method": "updateSms", "group": "messages", - "weight": 313, + "weight": 303, "cookies": false, "type": "", "demo": "messaging\/update-sms.md", @@ -18591,7 +18609,7 @@ "x-appwrite": { "method": "getMessage", "group": "messages", - "weight": 311, + "weight": 301, "cookies": false, "type": "", "demo": "messaging\/get-message.md", @@ -18646,7 +18664,7 @@ "x-appwrite": { "method": "delete", "group": "messages", - "weight": 315, + "weight": 305, "cookies": false, "type": "", "demo": "messaging\/delete.md", @@ -18706,7 +18724,7 @@ "x-appwrite": { "method": "listMessageLogs", "group": "logs", - "weight": 309, + "weight": 299, "cookies": false, "type": "", "demo": "messaging\/list-message-logs.md", @@ -18787,7 +18805,7 @@ "x-appwrite": { "method": "listTargets", "group": "messages", - "weight": 310, + "weight": 300, "cookies": false, "type": "", "demo": "messaging\/list-targets.md", @@ -18868,7 +18886,7 @@ "x-appwrite": { "method": "listProviders", "group": "providers", - "weight": 279, + "weight": 269, "cookies": false, "type": "", "demo": "messaging\/list-providers.md", @@ -18952,7 +18970,7 @@ "x-appwrite": { "method": "createApnsProvider", "group": "providers", - "weight": 278, + "weight": 268, "cookies": false, "type": "", "demo": "messaging\/create-apns-provider.md", @@ -19138,7 +19156,7 @@ "x-appwrite": { "method": "updateApnsProvider", "group": "providers", - "weight": 292, + "weight": 282, "cookies": false, "type": "", "demo": "messaging\/update-apns-provider.md", @@ -19321,7 +19339,7 @@ "x-appwrite": { "method": "createFcmProvider", "group": "providers", - "weight": 277, + "weight": 267, "cookies": false, "type": "", "demo": "messaging\/create-fcm-provider.md", @@ -19476,7 +19494,7 @@ "x-appwrite": { "method": "updateFcmProvider", "group": "providers", - "weight": 291, + "weight": 281, "cookies": false, "type": "", "demo": "messaging\/update-fcm-provider.md", @@ -19627,7 +19645,7 @@ "x-appwrite": { "method": "createMailgunProvider", "group": "providers", - "weight": 268, + "weight": 258, "cookies": false, "type": "", "demo": "messaging\/create-mailgun-provider.md", @@ -19756,7 +19774,7 @@ "x-appwrite": { "method": "updateMailgunProvider", "group": "providers", - "weight": 282, + "weight": 272, "cookies": false, "type": "", "demo": "messaging\/update-mailgun-provider.md", @@ -19883,7 +19901,7 @@ "x-appwrite": { "method": "createMsg91Provider", "group": "providers", - "weight": 272, + "weight": 262, "cookies": false, "type": "", "demo": "messaging\/create-msg-91-provider.md", @@ -19987,7 +20005,7 @@ "x-appwrite": { "method": "updateMsg91Provider", "group": "providers", - "weight": 286, + "weight": 276, "cookies": false, "type": "", "demo": "messaging\/update-msg-91-provider.md", @@ -20089,7 +20107,7 @@ "x-appwrite": { "method": "createResendProvider", "group": "providers", - "weight": 270, + "weight": 260, "cookies": false, "type": "", "demo": "messaging\/create-resend-provider.md", @@ -20205,7 +20223,7 @@ "x-appwrite": { "method": "updateResendProvider", "group": "providers", - "weight": 284, + "weight": 274, "cookies": false, "type": "", "demo": "messaging\/update-resend-provider.md", @@ -20319,7 +20337,7 @@ "x-appwrite": { "method": "createSendgridProvider", "group": "providers", - "weight": 269, + "weight": 259, "cookies": false, "type": "", "demo": "messaging\/create-sendgrid-provider.md", @@ -20435,7 +20453,7 @@ "x-appwrite": { "method": "updateSendgridProvider", "group": "providers", - "weight": 283, + "weight": 273, "cookies": false, "type": "", "demo": "messaging\/update-sendgrid-provider.md", @@ -20549,7 +20567,7 @@ "x-appwrite": { "method": "createSmtpProvider", "group": "providers", - "weight": 271, + "weight": 261, "cookies": false, "type": "", "demo": "messaging\/create-smtp-provider.md", @@ -20793,7 +20811,7 @@ "x-appwrite": { "method": "updateSmtpProvider", "group": "providers", - "weight": 285, + "weight": 275, "cookies": false, "type": "", "demo": "messaging\/update-smtp-provider.md", @@ -21032,7 +21050,7 @@ "x-appwrite": { "method": "createTelesignProvider", "group": "providers", - "weight": 273, + "weight": 263, "cookies": false, "type": "", "demo": "messaging\/create-telesign-provider.md", @@ -21136,7 +21154,7 @@ "x-appwrite": { "method": "updateTelesignProvider", "group": "providers", - "weight": 287, + "weight": 277, "cookies": false, "type": "", "demo": "messaging\/update-telesign-provider.md", @@ -21238,7 +21256,7 @@ "x-appwrite": { "method": "createTextmagicProvider", "group": "providers", - "weight": 274, + "weight": 264, "cookies": false, "type": "", "demo": "messaging\/create-textmagic-provider.md", @@ -21342,7 +21360,7 @@ "x-appwrite": { "method": "updateTextmagicProvider", "group": "providers", - "weight": 288, + "weight": 278, "cookies": false, "type": "", "demo": "messaging\/update-textmagic-provider.md", @@ -21444,7 +21462,7 @@ "x-appwrite": { "method": "createTwilioProvider", "group": "providers", - "weight": 275, + "weight": 265, "cookies": false, "type": "", "demo": "messaging\/create-twilio-provider.md", @@ -21548,7 +21566,7 @@ "x-appwrite": { "method": "updateTwilioProvider", "group": "providers", - "weight": 289, + "weight": 279, "cookies": false, "type": "", "demo": "messaging\/update-twilio-provider.md", @@ -21650,7 +21668,7 @@ "x-appwrite": { "method": "createVonageProvider", "group": "providers", - "weight": 276, + "weight": 266, "cookies": false, "type": "", "demo": "messaging\/create-vonage-provider.md", @@ -21754,7 +21772,7 @@ "x-appwrite": { "method": "updateVonageProvider", "group": "providers", - "weight": 290, + "weight": 280, "cookies": false, "type": "", "demo": "messaging\/update-vonage-provider.md", @@ -21854,7 +21872,7 @@ "x-appwrite": { "method": "getProvider", "group": "providers", - "weight": 281, + "weight": 271, "cookies": false, "type": "", "demo": "messaging\/get-provider.md", @@ -21909,7 +21927,7 @@ "x-appwrite": { "method": "deleteProvider", "group": "providers", - "weight": 293, + "weight": 283, "cookies": false, "type": "", "demo": "messaging\/delete-provider.md", @@ -21969,7 +21987,7 @@ "x-appwrite": { "method": "listProviderLogs", "group": "providers", - "weight": 280, + "weight": 270, "cookies": false, "type": "", "demo": "messaging\/list-provider-logs.md", @@ -22050,7 +22068,7 @@ "x-appwrite": { "method": "listSubscriberLogs", "group": "subscribers", - "weight": 302, + "weight": 292, "cookies": false, "type": "", "demo": "messaging\/list-subscriber-logs.md", @@ -22131,7 +22149,7 @@ "x-appwrite": { "method": "listTopics", "group": "topics", - "weight": 295, + "weight": 285, "cookies": false, "type": "", "demo": "messaging\/list-topics.md", @@ -22213,7 +22231,7 @@ "x-appwrite": { "method": "createTopic", "group": "topics", - "weight": 294, + "weight": 284, "cookies": false, "type": "", "demo": "messaging\/create-topic.md", @@ -22301,7 +22319,7 @@ "x-appwrite": { "method": "getTopic", "group": "topics", - "weight": 297, + "weight": 287, "cookies": false, "type": "", "demo": "messaging\/get-topic.md", @@ -22361,7 +22379,7 @@ "x-appwrite": { "method": "updateTopic", "group": "topics", - "weight": 298, + "weight": 288, "cookies": false, "type": "", "demo": "messaging\/update-topic.md", @@ -22442,7 +22460,7 @@ "x-appwrite": { "method": "deleteTopic", "group": "topics", - "weight": 299, + "weight": 289, "cookies": false, "type": "", "demo": "messaging\/delete-topic.md", @@ -22502,7 +22520,7 @@ "x-appwrite": { "method": "listTopicLogs", "group": "topics", - "weight": 296, + "weight": 286, "cookies": false, "type": "", "demo": "messaging\/list-topic-logs.md", @@ -22583,7 +22601,7 @@ "x-appwrite": { "method": "listSubscribers", "group": "subscribers", - "weight": 301, + "weight": 291, "cookies": false, "type": "", "demo": "messaging\/list-subscribers.md", @@ -22673,7 +22691,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 300, + "weight": 290, "cookies": false, "type": "", "demo": "messaging\/create-subscriber.md", @@ -22760,7 +22778,7 @@ "x-appwrite": { "method": "getSubscriber", "group": "subscribers", - "weight": 303, + "weight": 293, "cookies": false, "type": "", "demo": "messaging\/get-subscriber.md", @@ -22823,7 +22841,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 304, + "weight": 294, "cookies": false, "type": "", "demo": "messaging\/delete-subscriber.md", @@ -22893,7 +22911,7 @@ "x-appwrite": { "method": "list", "group": null, - "weight": 260, + "weight": 250, "cookies": false, "type": "", "demo": "migrations\/list.md", @@ -22975,7 +22993,7 @@ "x-appwrite": { "method": "createAppwriteMigration", "group": null, - "weight": 254, + "weight": 244, "cookies": false, "type": "", "demo": "migrations\/create-appwrite-migration.md", @@ -23067,7 +23085,7 @@ "x-appwrite": { "method": "getAppwriteReport", "group": null, - "weight": 262, + "weight": 252, "cookies": false, "type": "", "demo": "migrations\/get-appwrite-report.md", @@ -23155,7 +23173,7 @@ "x-appwrite": { "method": "createCSVExport", "group": null, - "weight": 259, + "weight": 249, "cookies": false, "type": "", "demo": "migrations\/create-csv-export.md", @@ -23280,7 +23298,7 @@ "x-appwrite": { "method": "createCSVImport", "group": null, - "weight": 258, + "weight": 248, "cookies": false, "type": "", "demo": "migrations\/create-csv-import.md", @@ -23370,7 +23388,7 @@ "x-appwrite": { "method": "createFirebaseMigration", "group": null, - "weight": 255, + "weight": 245, "cookies": false, "type": "", "demo": "migrations\/create-firebase-migration.md", @@ -23448,7 +23466,7 @@ "x-appwrite": { "method": "getFirebaseReport", "group": null, - "weight": 263, + "weight": 253, "cookies": false, "type": "", "demo": "migrations\/get-firebase-report.md", @@ -23519,7 +23537,7 @@ "x-appwrite": { "method": "createNHostMigration", "group": null, - "weight": 257, + "weight": 247, "cookies": false, "type": "", "demo": "migrations\/create-n-host-migration.md", @@ -23638,7 +23656,7 @@ "x-appwrite": { "method": "getNHostReport", "group": null, - "weight": 265, + "weight": 255, "cookies": false, "type": "", "demo": "migrations\/get-n-host-report.md", @@ -23758,7 +23776,7 @@ "x-appwrite": { "method": "createSupabaseMigration", "group": null, - "weight": 256, + "weight": 246, "cookies": false, "type": "", "demo": "migrations\/create-supabase-migration.md", @@ -23870,7 +23888,7 @@ "x-appwrite": { "method": "getSupabaseReport", "group": null, - "weight": 264, + "weight": 254, "cookies": false, "type": "", "demo": "migrations\/get-supabase-report.md", @@ -23981,7 +23999,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 261, + "weight": 251, "cookies": false, "type": "", "demo": "migrations\/get.md", @@ -24039,7 +24057,7 @@ "x-appwrite": { "method": "retry", "group": null, - "weight": 266, + "weight": 256, "cookies": false, "type": "", "demo": "migrations\/retry.md", @@ -24092,7 +24110,7 @@ "x-appwrite": { "method": "delete", "group": null, - "weight": 267, + "weight": 257, "cookies": false, "type": "", "demo": "migrations\/delete.md", @@ -24150,7 +24168,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 149, + "weight": 139, "cookies": false, "type": "", "demo": "project\/get-usage.md", @@ -24232,7 +24250,7 @@ "x-appwrite": { "method": "listVariables", "group": null, - "weight": 151, + "weight": 141, "cookies": false, "type": "", "demo": "project\/list-variables.md", @@ -24280,7 +24298,7 @@ "x-appwrite": { "method": "createVariable", "group": null, - "weight": 150, + "weight": 140, "cookies": false, "type": "", "demo": "project\/create-variable.md", @@ -24361,7 +24379,7 @@ "x-appwrite": { "method": "getVariable", "group": null, - "weight": 152, + "weight": 142, "cookies": false, "type": "", "demo": "project\/get-variable.md", @@ -24419,7 +24437,7 @@ "x-appwrite": { "method": "updateVariable", "group": null, - "weight": 153, + "weight": 143, "cookies": false, "type": "", "demo": "project\/update-variable.md", @@ -24504,7 +24522,7 @@ "x-appwrite": { "method": "deleteVariable", "group": null, - "weight": 154, + "weight": 144, "cookies": false, "type": "", "demo": "project\/delete-variable.md", @@ -24642,7 +24660,7 @@ "x-appwrite": { "method": "create", "group": "projects", - "weight": 103, + "weight": 93, "cookies": false, "type": "", "demo": "projects\/create.md", @@ -24789,7 +24807,7 @@ "x-appwrite": { "method": "get", "group": "projects", - "weight": 104, + "weight": 94, "cookies": false, "type": "", "demo": "projects\/get.md", @@ -24847,7 +24865,7 @@ "x-appwrite": { "method": "update", "group": "projects", - "weight": 105, + "weight": 95, "cookies": false, "type": "", "demo": "projects\/update.md", @@ -24972,7 +24990,7 @@ "x-appwrite": { "method": "delete", "group": "projects", - "weight": 122, + "weight": 112, "cookies": false, "type": "", "demo": "projects\/delete.md", @@ -25032,7 +25050,7 @@ "x-appwrite": { "method": "updateApiStatus", "group": "projects", - "weight": 109, + "weight": 99, "cookies": false, "type": "", "demo": "projects\/update-api-status.md", @@ -25186,7 +25204,7 @@ "x-appwrite": { "method": "updateApiStatusAll", "group": "projects", - "weight": 110, + "weight": 100, "cookies": false, "type": "", "demo": "projects\/update-api-status-all.md", @@ -25322,7 +25340,7 @@ "x-appwrite": { "method": "updateAuthDuration", "group": "auth", - "weight": 115, + "weight": 105, "cookies": false, "type": "", "demo": "projects\/update-auth-duration.md", @@ -25400,7 +25418,7 @@ "x-appwrite": { "method": "updateAuthLimit", "group": "auth", - "weight": 114, + "weight": 104, "cookies": false, "type": "", "demo": "projects\/update-auth-limit.md", @@ -25478,7 +25496,7 @@ "x-appwrite": { "method": "updateAuthSessionsLimit", "group": "auth", - "weight": 120, + "weight": 110, "cookies": false, "type": "", "demo": "projects\/update-auth-sessions-limit.md", @@ -25556,7 +25574,7 @@ "x-appwrite": { "method": "updateMembershipsPrivacy", "group": "auth", - "weight": 113, + "weight": 103, "cookies": false, "type": "", "demo": "projects\/update-memberships-privacy.md", @@ -25648,7 +25666,7 @@ "x-appwrite": { "method": "updateMockNumbers", "group": "auth", - "weight": 121, + "weight": 111, "cookies": false, "type": "", "demo": "projects\/update-mock-numbers.md", @@ -25729,7 +25747,7 @@ "x-appwrite": { "method": "updateAuthPasswordDictionary", "group": "auth", - "weight": 118, + "weight": 108, "cookies": false, "type": "", "demo": "projects\/update-auth-password-dictionary.md", @@ -25807,7 +25825,7 @@ "x-appwrite": { "method": "updateAuthPasswordHistory", "group": "auth", - "weight": 117, + "weight": 107, "cookies": false, "type": "", "demo": "projects\/update-auth-password-history.md", @@ -25885,7 +25903,7 @@ "x-appwrite": { "method": "updatePersonalDataCheck", "group": "auth", - "weight": 119, + "weight": 109, "cookies": false, "type": "", "demo": "projects\/update-personal-data-check.md", @@ -25963,7 +25981,7 @@ "x-appwrite": { "method": "updateSessionAlerts", "group": "auth", - "weight": 112, + "weight": 102, "cookies": false, "type": "", "demo": "projects\/update-session-alerts.md", @@ -26041,7 +26059,7 @@ "x-appwrite": { "method": "updateSessionInvalidation", "group": "auth", - "weight": 148, + "weight": 138, "cookies": false, "type": "", "demo": "projects\/update-session-invalidation.md", @@ -26119,7 +26137,7 @@ "x-appwrite": { "method": "updateAuthStatus", "group": "auth", - "weight": 116, + "weight": 106, "cookies": false, "type": "", "demo": "projects\/update-auth-status.md", @@ -26587,7 +26605,7 @@ "x-appwrite": { "method": "createJWT", "group": "auth", - "weight": 134, + "weight": 124, "cookies": false, "type": "", "demo": "projects\/create-jwt.md", @@ -26672,7 +26690,7 @@ "x-appwrite": { "method": "listKeys", "group": "keys", - "weight": 130, + "weight": 120, "cookies": false, "type": "", "demo": "projects\/list-keys.md", @@ -26739,7 +26757,7 @@ "x-appwrite": { "method": "createKey", "group": "keys", - "weight": 129, + "weight": 119, "cookies": false, "type": "", "demo": "projects\/create-key.md", @@ -26833,7 +26851,7 @@ "x-appwrite": { "method": "getKey", "group": "keys", - "weight": 131, + "weight": 121, "cookies": false, "type": "", "demo": "projects\/get-key.md", @@ -26899,7 +26917,7 @@ "x-appwrite": { "method": "updateKey", "group": "keys", - "weight": 132, + "weight": 122, "cookies": false, "type": "", "demo": "projects\/update-key.md", @@ -26996,7 +27014,7 @@ "x-appwrite": { "method": "deleteKey", "group": "keys", - "weight": 133, + "weight": 123, "cookies": false, "type": "", "demo": "projects\/delete-key.md", @@ -27064,7 +27082,7 @@ "x-appwrite": { "method": "updateOAuth2", "group": "auth", - "weight": 111, + "weight": 101, "cookies": false, "type": "", "demo": "projects\/update-o-auth-2.md", @@ -27205,7 +27223,7 @@ "x-appwrite": { "method": "listPlatforms", "group": "platforms", - "weight": 136, + "weight": 126, "cookies": false, "type": "", "demo": "projects\/list-platforms.md", @@ -27272,7 +27290,7 @@ "x-appwrite": { "method": "createPlatform", "group": "platforms", - "weight": 135, + "weight": 125, "cookies": false, "type": "", "demo": "projects\/create-platform.md", @@ -27392,7 +27410,7 @@ "x-appwrite": { "method": "getPlatform", "group": "platforms", - "weight": 137, + "weight": 127, "cookies": false, "type": "", "demo": "projects\/get-platform.md", @@ -27458,7 +27476,7 @@ "x-appwrite": { "method": "updatePlatform", "group": "platforms", - "weight": 138, + "weight": 128, "cookies": false, "type": "", "demo": "projects\/update-platform.md", @@ -27555,7 +27573,7 @@ "x-appwrite": { "method": "deletePlatform", "group": "platforms", - "weight": 139, + "weight": 129, "cookies": false, "type": "", "demo": "projects\/delete-platform.md", @@ -27623,7 +27641,7 @@ "x-appwrite": { "method": "updateServiceStatus", "group": "projects", - "weight": 107, + "weight": 97, "cookies": false, "type": "", "demo": "projects\/update-service-status.md", @@ -27725,7 +27743,7 @@ "x-appwrite": { "method": "updateServiceStatusAll", "group": "projects", - "weight": 108, + "weight": 98, "cookies": false, "type": "", "demo": "projects\/update-service-status-all.md", @@ -27803,7 +27821,7 @@ "x-appwrite": { "method": "updateSmtp", "group": "templates", - "weight": 140, + "weight": 130, "cookies": false, "type": "", "demo": "projects\/update-smtp.md", @@ -28006,7 +28024,7 @@ "x-appwrite": { "method": "createSmtpTest", "group": "templates", - "weight": 141, + "weight": 131, "cookies": false, "type": "", "demo": "projects\/create-smtp-test.md", @@ -28222,7 +28240,7 @@ "x-appwrite": { "method": "updateTeam", "group": "projects", - "weight": 106, + "weight": 96, "cookies": false, "type": "", "demo": "projects\/update-team.md", @@ -28298,7 +28316,7 @@ "x-appwrite": { "method": "getEmailTemplate", "group": "templates", - "weight": 143, + "weight": 133, "cookies": false, "type": "", "demo": "projects\/get-email-template.md", @@ -28518,7 +28536,7 @@ "x-appwrite": { "method": "updateEmailTemplate", "group": "templates", - "weight": 145, + "weight": 135, "cookies": false, "type": "", "demo": "projects\/update-email-template.md", @@ -28781,7 +28799,7 @@ "x-appwrite": { "method": "deleteEmailTemplate", "group": "templates", - "weight": 147, + "weight": 137, "cookies": false, "type": "", "demo": "projects\/delete-email-template.md", @@ -29001,7 +29019,7 @@ "x-appwrite": { "method": "getSmsTemplate", "group": "templates", - "weight": 142, + "weight": 132, "cookies": false, "type": "", "demo": "projects\/get-sms-template.md", @@ -29280,7 +29298,7 @@ "x-appwrite": { "method": "updateSmsTemplate", "group": "templates", - "weight": 144, + "weight": 134, "cookies": false, "type": "", "demo": "projects\/update-sms-template.md", @@ -29581,7 +29599,7 @@ "x-appwrite": { "method": "deleteSmsTemplate", "group": "templates", - "weight": 146, + "weight": 136, "cookies": false, "type": "", "demo": "projects\/delete-sms-template.md", @@ -29860,7 +29878,7 @@ "x-appwrite": { "method": "listWebhooks", "group": "webhooks", - "weight": 124, + "weight": 114, "cookies": false, "type": "", "demo": "projects\/list-webhooks.md", @@ -29927,7 +29945,7 @@ "x-appwrite": { "method": "createWebhook", "group": "webhooks", - "weight": 123, + "weight": 113, "cookies": false, "type": "", "demo": "projects\/create-webhook.md", @@ -30045,7 +30063,7 @@ "x-appwrite": { "method": "getWebhook", "group": "webhooks", - "weight": 125, + "weight": 115, "cookies": false, "type": "", "demo": "projects\/get-webhook.md", @@ -30111,7 +30129,7 @@ "x-appwrite": { "method": "updateWebhook", "group": "webhooks", - "weight": 126, + "weight": 116, "cookies": false, "type": "", "demo": "projects\/update-webhook.md", @@ -30232,7 +30250,7 @@ "x-appwrite": { "method": "deleteWebhook", "group": "webhooks", - "weight": 128, + "weight": 118, "cookies": false, "type": "", "demo": "projects\/delete-webhook.md", @@ -30300,7 +30318,7 @@ "x-appwrite": { "method": "updateWebhookSignature", "group": "webhooks", - "weight": 127, + "weight": 117, "cookies": false, "type": "", "demo": "projects\/update-webhook-signature.md", @@ -33539,7 +33557,7 @@ "x-appwrite": { "method": "listBuckets", "group": "buckets", - "weight": 156, + "weight": 146, "cookies": false, "type": "", "demo": "storage\/list-buckets.md", @@ -33620,7 +33638,7 @@ "x-appwrite": { "method": "createBucket", "group": "buckets", - "weight": 155, + "weight": 145, "cookies": false, "type": "", "demo": "storage\/create-bucket.md", @@ -33764,7 +33782,7 @@ "x-appwrite": { "method": "getBucket", "group": "buckets", - "weight": 157, + "weight": 147, "cookies": false, "type": "", "demo": "storage\/get-bucket.md", @@ -33823,7 +33841,7 @@ "x-appwrite": { "method": "updateBucket", "group": "buckets", - "weight": 158, + "weight": 148, "cookies": false, "type": "", "demo": "storage\/update-bucket.md", @@ -33963,7 +33981,7 @@ "x-appwrite": { "method": "deleteBucket", "group": "buckets", - "weight": 159, + "weight": 149, "cookies": false, "type": "", "demo": "storage\/delete-bucket.md", @@ -34022,7 +34040,7 @@ "x-appwrite": { "method": "listFiles", "group": "files", - "weight": 161, + "weight": 151, "cookies": false, "type": "", "demo": "storage\/list-files.md", @@ -34113,7 +34131,7 @@ "x-appwrite": { "method": "createFile", "group": "files", - "weight": 160, + "weight": 150, "cookies": false, "type": "upload", "demo": "storage\/create-file.md", @@ -34202,7 +34220,7 @@ "x-appwrite": { "method": "getFile", "group": "files", - "weight": 162, + "weight": 152, "cookies": false, "type": "", "demo": "storage\/get-file.md", @@ -34271,7 +34289,7 @@ "x-appwrite": { "method": "updateFile", "group": "files", - "weight": 167, + "weight": 157, "cookies": false, "type": "", "demo": "storage\/update-file.md", @@ -34361,7 +34379,7 @@ "x-appwrite": { "method": "deleteFile", "group": "files", - "weight": 168, + "weight": 158, "cookies": false, "type": "", "demo": "storage\/delete-file.md", @@ -34430,7 +34448,7 @@ "x-appwrite": { "method": "getFileDownload", "group": "files", - "weight": 164, + "weight": 154, "cookies": false, "type": "location", "demo": "storage\/get-file-download.md", @@ -34508,7 +34526,7 @@ "x-appwrite": { "method": "getFilePreview", "group": "files", - "weight": 163, + "weight": 153, "cookies": false, "type": "location", "demo": "storage\/get-file-preview.md", @@ -34714,7 +34732,7 @@ "x-appwrite": { "method": "getFileView", "group": "files", - "weight": 165, + "weight": 155, "cookies": false, "type": "location", "demo": "storage\/get-file-view.md", @@ -34792,7 +34810,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 169, + "weight": 159, "cookies": false, "type": "", "demo": "storage\/get-usage.md", @@ -34862,7 +34880,7 @@ "x-appwrite": { "method": "getBucketUsage", "group": null, - "weight": 170, + "weight": 160, "cookies": false, "type": "", "demo": "storage\/get-bucket-usage.md", @@ -35991,6 +36009,24 @@ "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", "default": true, "x-example": false + }, + "columns": { + "type": "array", + "description": "Array of column definitions to create. Each column should contain: key (string), type (string: string, integer, float, boolean, datetime, relationship), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.", + "default": [], + "x-example": null, + "items": { + "type": "object" + } + }, + "indexes": { + "type": "array", + "description": "Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of column keys), orders (array of ASC\/DESC, optional), and lengths (array of integers, optional).", + "default": [], + "x-example": null, + "items": { + "type": "object" + } } }, "required": [ @@ -41553,7 +41589,7 @@ "x-appwrite": { "method": "list", "group": "teams", - "weight": 172, + "weight": 162, "cookies": false, "type": "", "demo": "teams\/list.md", @@ -41636,7 +41672,7 @@ "x-appwrite": { "method": "create", "group": "teams", - "weight": 171, + "weight": 161, "cookies": false, "type": "", "demo": "teams\/create.md", @@ -41725,7 +41761,7 @@ "x-appwrite": { "method": "get", "group": "teams", - "weight": 173, + "weight": 163, "cookies": false, "type": "", "demo": "teams\/get.md", @@ -41786,7 +41822,7 @@ "x-appwrite": { "method": "updateName", "group": "teams", - "weight": 175, + "weight": 165, "cookies": false, "type": "", "demo": "teams\/update-name.md", @@ -41860,7 +41896,7 @@ "x-appwrite": { "method": "delete", "group": "teams", - "weight": 177, + "weight": 167, "cookies": false, "type": "", "demo": "teams\/delete.md", @@ -41921,7 +41957,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 184, + "weight": 174, "cookies": false, "type": "", "demo": "teams\/list-logs.md", @@ -42000,7 +42036,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 179, + "weight": 169, "cookies": false, "type": "", "demo": "teams\/list-memberships.md", @@ -42091,7 +42127,7 @@ "x-appwrite": { "method": "createMembership", "group": "memberships", - "weight": 178, + "weight": 168, "cookies": false, "type": "", "demo": "teams\/create-membership.md", @@ -42203,7 +42239,7 @@ "x-appwrite": { "method": "getMembership", "group": "memberships", - "weight": 180, + "weight": 170, "cookies": false, "type": "", "demo": "teams\/get-membership.md", @@ -42272,7 +42308,7 @@ "x-appwrite": { "method": "updateMembership", "group": "memberships", - "weight": 181, + "weight": 171, "cookies": false, "type": "", "demo": "teams\/update-membership.md", @@ -42357,7 +42393,7 @@ "x-appwrite": { "method": "deleteMembership", "group": "memberships", - "weight": 183, + "weight": 173, "cookies": false, "type": "", "demo": "teams\/delete-membership.md", @@ -42428,7 +42464,7 @@ "x-appwrite": { "method": "updateMembershipStatus", "group": "memberships", - "weight": 182, + "weight": 172, "cookies": false, "type": "", "demo": "teams\/update-membership-status.md", @@ -42521,7 +42557,7 @@ "x-appwrite": { "method": "getPrefs", "group": "teams", - "weight": 174, + "weight": 164, "cookies": false, "type": "", "demo": "teams\/get-prefs.md", @@ -42581,7 +42617,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "teams", - "weight": 176, + "weight": 166, "cookies": false, "type": "", "demo": "teams\/update-prefs.md", @@ -43023,7 +43059,7 @@ "x-appwrite": { "method": "list", "group": "users", - "weight": 194, + "weight": 184, "cookies": false, "type": "", "demo": "users\/list.md", @@ -43104,7 +43140,7 @@ "x-appwrite": { "method": "create", "group": "users", - "weight": 185, + "weight": 175, "cookies": false, "type": "", "demo": "users\/create.md", @@ -43201,7 +43237,7 @@ "x-appwrite": { "method": "createArgon2User", "group": "users", - "weight": 188, + "weight": 178, "cookies": false, "type": "", "demo": "users\/create-argon-2-user.md", @@ -43292,7 +43328,7 @@ "x-appwrite": { "method": "createBcryptUser", "group": "users", - "weight": 186, + "weight": 176, "cookies": false, "type": "", "demo": "users\/create-bcrypt-user.md", @@ -43381,7 +43417,7 @@ "x-appwrite": { "method": "listIdentities", "group": "identities", - "weight": 202, + "weight": 192, "cookies": false, "type": "", "demo": "users\/list-identities.md", @@ -43459,7 +43495,7 @@ "x-appwrite": { "method": "deleteIdentity", "group": "identities", - "weight": 225, + "weight": 215, "cookies": false, "type": "", "demo": "users\/delete-identity.md", @@ -43520,7 +43556,7 @@ "x-appwrite": { "method": "createMD5User", "group": "users", - "weight": 187, + "weight": 177, "cookies": false, "type": "", "demo": "users\/create-md-5-user.md", @@ -43611,7 +43647,7 @@ "x-appwrite": { "method": "createPHPassUser", "group": "users", - "weight": 190, + "weight": 180, "cookies": false, "type": "", "demo": "users\/create-ph-pass-user.md", @@ -43702,7 +43738,7 @@ "x-appwrite": { "method": "createScryptUser", "group": "users", - "weight": 191, + "weight": 181, "cookies": false, "type": "", "demo": "users\/create-scrypt-user.md", @@ -43828,7 +43864,7 @@ "x-appwrite": { "method": "createScryptModifiedUser", "group": "users", - "weight": 192, + "weight": 182, "cookies": false, "type": "", "demo": "users\/create-scrypt-modified-user.md", @@ -43940,7 +43976,7 @@ "x-appwrite": { "method": "createSHAUser", "group": "users", - "weight": 189, + "weight": 179, "cookies": false, "type": "", "demo": "users\/create-sha-user.md", @@ -44050,7 +44086,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 227, + "weight": 217, "cookies": false, "type": "", "demo": "users\/get-usage.md", @@ -44120,7 +44156,7 @@ "x-appwrite": { "method": "get", "group": "users", - "weight": 195, + "weight": 185, "cookies": false, "type": "", "demo": "users\/get.md", @@ -44174,7 +44210,7 @@ "x-appwrite": { "method": "delete", "group": "users", - "weight": 223, + "weight": 213, "cookies": false, "type": "", "demo": "users\/delete.md", @@ -44235,7 +44271,7 @@ "x-appwrite": { "method": "updateEmail", "group": "users", - "weight": 208, + "weight": 198, "cookies": false, "type": "", "demo": "users\/update-email.md", @@ -44314,7 +44350,7 @@ "x-appwrite": { "method": "createJWT", "group": "sessions", - "weight": 226, + "weight": 216, "cookies": false, "type": "", "demo": "users\/create-jwt.md", @@ -44396,7 +44432,7 @@ "x-appwrite": { "method": "updateLabels", "group": "users", - "weight": 204, + "weight": 194, "cookies": false, "type": "", "demo": "users\/update-labels.md", @@ -44476,7 +44512,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 200, + "weight": 190, "cookies": false, "type": "", "demo": "users\/list-logs.md", @@ -44556,7 +44592,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 199, + "weight": 189, "cookies": false, "type": "", "demo": "users\/list-memberships.md", @@ -44647,7 +44683,7 @@ "x-appwrite": { "method": "updateMfa", "group": "users", - "weight": 213, + "weight": 203, "cookies": false, "type": "", "demo": "users\/update-mfa.md", @@ -44779,7 +44815,7 @@ "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", - "weight": 218, + "weight": 208, "cookies": false, "type": "", "demo": "users\/delete-mfa-authenticator.md", @@ -44907,7 +44943,7 @@ "x-appwrite": { "method": "listMfaFactors", "group": "mfa", - "weight": 214, + "weight": 204, "cookies": false, "type": "", "demo": "users\/list-mfa-factors.md", @@ -45020,7 +45056,7 @@ "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", - "weight": 215, + "weight": 205, "cookies": false, "type": "", "demo": "users\/get-mfa-recovery-codes.md", @@ -45133,7 +45169,7 @@ "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", - "weight": 217, + "weight": 207, "cookies": false, "type": "", "demo": "users\/update-mfa-recovery-codes.md", @@ -45246,7 +45282,7 @@ "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", - "weight": 216, + "weight": 206, "cookies": false, "type": "", "demo": "users\/create-mfa-recovery-codes.md", @@ -45361,7 +45397,7 @@ "x-appwrite": { "method": "updateName", "group": "users", - "weight": 206, + "weight": 196, "cookies": false, "type": "", "demo": "users\/update-name.md", @@ -45440,7 +45476,7 @@ "x-appwrite": { "method": "updatePassword", "group": "users", - "weight": 207, + "weight": 197, "cookies": false, "type": "", "demo": "users\/update-password.md", @@ -45519,7 +45555,7 @@ "x-appwrite": { "method": "updatePhone", "group": "users", - "weight": 209, + "weight": 199, "cookies": false, "type": "", "demo": "users\/update-phone.md", @@ -45596,7 +45632,7 @@ "x-appwrite": { "method": "getPrefs", "group": "users", - "weight": 196, + "weight": 186, "cookies": false, "type": "", "demo": "users\/get-prefs.md", @@ -45655,7 +45691,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "users", - "weight": 211, + "weight": 201, "cookies": false, "type": "", "demo": "users\/update-prefs.md", @@ -45732,7 +45768,7 @@ "x-appwrite": { "method": "listSessions", "group": "sessions", - "weight": 198, + "weight": 188, "cookies": false, "type": "", "demo": "users\/list-sessions.md", @@ -45800,7 +45836,7 @@ "x-appwrite": { "method": "createSession", "group": "sessions", - "weight": 219, + "weight": 209, "cookies": false, "type": "", "demo": "users\/create-session.md", @@ -45854,7 +45890,7 @@ "x-appwrite": { "method": "deleteSessions", "group": "sessions", - "weight": 222, + "weight": 212, "cookies": false, "type": "", "demo": "users\/delete-sessions.md", @@ -45910,7 +45946,7 @@ "x-appwrite": { "method": "deleteSession", "group": "sessions", - "weight": 221, + "weight": 211, "cookies": false, "type": "", "demo": "users\/delete-session.md", @@ -45979,7 +46015,7 @@ "x-appwrite": { "method": "updateStatus", "group": "users", - "weight": 203, + "weight": 193, "cookies": false, "type": "", "demo": "users\/update-status.md", @@ -46056,7 +46092,7 @@ "x-appwrite": { "method": "listTargets", "group": "targets", - "weight": 201, + "weight": 191, "cookies": false, "type": "", "demo": "users\/list-targets.md", @@ -46137,7 +46173,7 @@ "x-appwrite": { "method": "createTarget", "group": "targets", - "weight": 193, + "weight": 183, "cookies": false, "type": "", "demo": "users\/create-target.md", @@ -46248,7 +46284,7 @@ "x-appwrite": { "method": "getTarget", "group": "targets", - "weight": 197, + "weight": 187, "cookies": false, "type": "", "demo": "users\/get-target.md", @@ -46316,7 +46352,7 @@ "x-appwrite": { "method": "updateTarget", "group": "targets", - "weight": 212, + "weight": 202, "cookies": false, "type": "", "demo": "users\/update-target.md", @@ -46406,7 +46442,7 @@ "x-appwrite": { "method": "deleteTarget", "group": "targets", - "weight": 224, + "weight": 214, "cookies": false, "type": "", "demo": "users\/delete-target.md", @@ -46476,7 +46512,7 @@ "x-appwrite": { "method": "createToken", "group": "sessions", - "weight": 220, + "weight": 210, "cookies": false, "type": "", "demo": "users\/create-token.md", @@ -46558,7 +46594,7 @@ "x-appwrite": { "method": "updateEmailVerification", "group": "users", - "weight": 210, + "weight": 200, "cookies": false, "type": "", "demo": "users\/update-email-verification.md", @@ -46637,7 +46673,7 @@ "x-appwrite": { "method": "updatePhoneVerification", "group": "users", - "weight": 205, + "weight": 195, "cookies": false, "type": "", "demo": "users\/update-phone-verification.md", @@ -46716,7 +46752,7 @@ "x-appwrite": { "method": "createRepositoryDetection", "group": "repositories", - "weight": 231, + "weight": 221, "cookies": false, "type": "", "demo": "vcs\/create-repository-detection.md", @@ -46811,7 +46847,7 @@ "x-appwrite": { "method": "listRepositories", "group": "repositories", - "weight": 232, + "weight": 222, "cookies": false, "type": "", "demo": "vcs\/list-repositories.md", @@ -46864,6 +46900,18 @@ "x-example": "", "default": "", "in": "query" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" } ] }, @@ -46892,7 +46940,7 @@ "x-appwrite": { "method": "createRepository", "group": "repositories", - "weight": 233, + "weight": 223, "cookies": false, "type": "", "demo": "vcs\/create-repository.md", @@ -46975,7 +47023,7 @@ "x-appwrite": { "method": "getRepository", "group": "repositories", - "weight": 234, + "weight": 224, "cookies": false, "type": "", "demo": "vcs\/get-repository.md", @@ -47041,7 +47089,7 @@ "x-appwrite": { "method": "listRepositoryBranches", "group": "repositories", - "weight": 235, + "weight": 225, "cookies": false, "type": "", "demo": "vcs\/list-repository-branches.md", @@ -47107,7 +47155,7 @@ "x-appwrite": { "method": "getRepositoryContents", "group": "repositories", - "weight": 230, + "weight": 220, "cookies": false, "type": "", "demo": "vcs\/get-repository-contents.md", @@ -47190,7 +47238,7 @@ "x-appwrite": { "method": "updateExternalDeployments", "group": "repositories", - "weight": 240, + "weight": 230, "cookies": false, "type": "", "demo": "vcs\/update-external-deployments.md", @@ -47274,7 +47322,7 @@ "x-appwrite": { "method": "listInstallations", "group": "installations", - "weight": 237, + "weight": 227, "cookies": false, "type": "", "demo": "vcs\/list-installations.md", @@ -47354,7 +47402,7 @@ "x-appwrite": { "method": "getInstallation", "group": "installations", - "weight": 238, + "weight": 228, "cookies": false, "type": "", "demo": "vcs\/get-installation.md", @@ -47407,7 +47455,7 @@ "x-appwrite": { "method": "deleteInstallation", "group": "installations", - "weight": 239, + "weight": 229, "cookies": false, "type": "", "demo": "vcs\/delete-installation.md", diff --git a/app/config/specs/swagger2-latest-server.json b/app/config/specs/swagger2-latest-server.json index b37aaac8e2..82fe0c6023 100644 --- a/app/config/specs/swagger2-latest-server.json +++ b/app/config/specs/swagger2-latest-server.json @@ -325,7 +325,7 @@ "x-appwrite": { "method": "listIdentities", "group": "identities", - "weight": 58, + "weight": 48, "cookies": false, "type": "", "demo": "account\/list-identities.md", @@ -397,7 +397,7 @@ "x-appwrite": { "method": "deleteIdentity", "group": "identities", - "weight": 59, + "weight": 49, "cookies": false, "type": "", "demo": "account\/delete-identity.md", @@ -587,7 +587,7 @@ "x-appwrite": { "method": "updateMFA", "group": "mfa", - "weight": 45, + "weight": 306, "cookies": false, "type": "", "demo": "account\/update-mfa.md", @@ -661,7 +661,7 @@ "x-appwrite": { "method": "createMfaAuthenticator", "group": "mfa", - "weight": 47, + "weight": 308, "cookies": false, "type": "", "demo": "account\/create-mfa-authenticator.md", @@ -784,7 +784,7 @@ "x-appwrite": { "method": "updateMfaAuthenticator", "group": "mfa", - "weight": 48, + "weight": 309, "cookies": false, "type": "", "demo": "account\/update-mfa-authenticator.md", @@ -924,7 +924,7 @@ "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", - "weight": 52, + "weight": 310, "cookies": false, "type": "", "demo": "account\/delete-mfa-authenticator.md", @@ -1021,7 +1021,7 @@ ] } }, - "\/account\/mfa\/challenge": { + "\/account\/mfa\/challenges": { "post": { "summary": "Create MFA challenge", "operationId": "accountCreateMfaChallenge", @@ -1047,7 +1047,7 @@ "x-appwrite": { "method": "createMfaChallenge", "group": "mfa", - "weight": 53, + "weight": 314, "cookies": false, "type": "", "demo": "account\/create-mfa-challenge.md", @@ -1178,7 +1178,7 @@ "x-appwrite": { "method": "updateMfaChallenge", "group": "mfa", - "weight": 54, + "weight": 315, "cookies": false, "type": "", "demo": "account\/update-mfa-challenge.md", @@ -1317,7 +1317,7 @@ "x-appwrite": { "method": "listMfaFactors", "group": "mfa", - "weight": 46, + "weight": 307, "cookies": false, "type": "", "demo": "account\/list-mfa-factors.md", @@ -1417,7 +1417,7 @@ "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", - "weight": 51, + "weight": 313, "cookies": false, "type": "", "demo": "account\/get-mfa-recovery-codes.md", @@ -1517,7 +1517,7 @@ "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", - "weight": 49, + "weight": 311, "cookies": false, "type": "", "demo": "account\/create-mfa-recovery-codes.md", @@ -1617,7 +1617,7 @@ "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", - "weight": 50, + "weight": 312, "cookies": false, "type": "", "demo": "account\/update-mfa-recovery-codes.md", @@ -3741,7 +3741,7 @@ "x-appwrite": { "method": "getBrowser", "group": null, - "weight": 61, + "weight": 51, "cookies": false, "type": "location", "demo": "avatars\/get-browser.md", @@ -3867,7 +3867,7 @@ "x-appwrite": { "method": "getCreditCard", "group": null, - "weight": 60, + "weight": 50, "cookies": false, "type": "location", "demo": "avatars\/get-credit-card.md", @@ -3999,7 +3999,7 @@ "x-appwrite": { "method": "getFavicon", "group": null, - "weight": 64, + "weight": 54, "cookies": false, "type": "location", "demo": "avatars\/get-favicon.md", @@ -4063,7 +4063,7 @@ "x-appwrite": { "method": "getFlag", "group": null, - "weight": 62, + "weight": 52, "cookies": false, "type": "location", "demo": "avatars\/get-flag.md", @@ -4551,7 +4551,7 @@ "x-appwrite": { "method": "getImage", "group": null, - "weight": 63, + "weight": 53, "cookies": false, "type": "location", "demo": "avatars\/get-image.md", @@ -4635,7 +4635,7 @@ "x-appwrite": { "method": "getInitials", "group": null, - "weight": 66, + "weight": 56, "cookies": false, "type": "location", "demo": "avatars\/get-initials.md", @@ -4727,7 +4727,7 @@ "x-appwrite": { "method": "getQR", "group": null, - "weight": 65, + "weight": 55, "cookies": false, "type": "location", "demo": "avatars\/get-qr.md", @@ -4819,7 +4819,7 @@ "x-appwrite": { "method": "getScreenshot", "group": null, - "weight": 67, + "weight": 57, "cookies": false, "type": "location", "demo": "avatars\/get-screenshot.md", @@ -6636,6 +6636,24 @@ "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", "default": true, "x-example": false + }, + "attributes": { + "type": "array", + "description": "Array of attribute definitions to create. Each attribute should contain: key (string), type (string: string, integer, float, boolean, datetime, relationship), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.", + "default": [], + "x-example": null, + "items": { + "type": "object" + } + }, + "indexes": { + "type": "array", + "description": "Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of attribute keys), orders (array of ASC\/DESC, optional), and lengths (array of integers, optional).", + "default": [], + "x-example": null, + "items": { + "type": "object" + } } }, "required": [ @@ -14340,7 +14358,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 251, + "weight": 241, "cookies": false, "type": "graphql", "demo": "graphql\/query.md", @@ -14415,7 +14433,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 250, + "weight": 240, "cookies": false, "type": "graphql", "demo": "graphql\/mutation.md", @@ -14488,7 +14506,7 @@ "x-appwrite": { "method": "get", "group": "health", - "weight": 79, + "weight": 69, "cookies": false, "type": "", "demo": "health\/get.md", @@ -14538,7 +14556,7 @@ "x-appwrite": { "method": "getAntivirus", "group": "health", - "weight": 100, + "weight": 90, "cookies": false, "type": "", "demo": "health\/get-antivirus.md", @@ -14588,7 +14606,7 @@ "x-appwrite": { "method": "getCache", "group": "health", - "weight": 82, + "weight": 72, "cookies": false, "type": "", "demo": "health\/get-cache.md", @@ -14638,7 +14656,7 @@ "x-appwrite": { "method": "getCertificate", "group": "health", - "weight": 87, + "weight": 77, "cookies": false, "type": "", "demo": "health\/get-certificate.md", @@ -14697,7 +14715,7 @@ "x-appwrite": { "method": "getDB", "group": "health", - "weight": 81, + "weight": 71, "cookies": false, "type": "", "demo": "health\/get-db.md", @@ -14747,7 +14765,7 @@ "x-appwrite": { "method": "getPubSub", "group": "health", - "weight": 83, + "weight": 73, "cookies": false, "type": "", "demo": "health\/get-pub-sub.md", @@ -14797,7 +14815,7 @@ "x-appwrite": { "method": "getQueueBuilds", "group": "queue", - "weight": 89, + "weight": 79, "cookies": false, "type": "", "demo": "health\/get-queue-builds.md", @@ -14858,7 +14876,7 @@ "x-appwrite": { "method": "getQueueCertificates", "group": "queue", - "weight": 88, + "weight": 78, "cookies": false, "type": "", "demo": "health\/get-queue-certificates.md", @@ -14919,7 +14937,7 @@ "x-appwrite": { "method": "getQueueDatabases", "group": "queue", - "weight": 90, + "weight": 80, "cookies": false, "type": "", "demo": "health\/get-queue-databases.md", @@ -14989,7 +15007,7 @@ "x-appwrite": { "method": "getQueueDeletes", "group": "queue", - "weight": 91, + "weight": 81, "cookies": false, "type": "", "demo": "health\/get-queue-deletes.md", @@ -15050,7 +15068,7 @@ "x-appwrite": { "method": "getFailedJobs", "group": "queue", - "weight": 101, + "weight": 91, "cookies": false, "type": "", "demo": "health\/get-failed-jobs.md", @@ -15135,7 +15153,7 @@ "x-appwrite": { "method": "getQueueFunctions", "group": "queue", - "weight": 95, + "weight": 85, "cookies": false, "type": "", "demo": "health\/get-queue-functions.md", @@ -15196,7 +15214,7 @@ "x-appwrite": { "method": "getQueueLogs", "group": "queue", - "weight": 86, + "weight": 76, "cookies": false, "type": "", "demo": "health\/get-queue-logs.md", @@ -15257,7 +15275,7 @@ "x-appwrite": { "method": "getQueueMails", "group": "queue", - "weight": 92, + "weight": 82, "cookies": false, "type": "", "demo": "health\/get-queue-mails.md", @@ -15318,7 +15336,7 @@ "x-appwrite": { "method": "getQueueMessaging", "group": "queue", - "weight": 93, + "weight": 83, "cookies": false, "type": "", "demo": "health\/get-queue-messaging.md", @@ -15379,7 +15397,7 @@ "x-appwrite": { "method": "getQueueMigrations", "group": "queue", - "weight": 94, + "weight": 84, "cookies": false, "type": "", "demo": "health\/get-queue-migrations.md", @@ -15440,7 +15458,7 @@ "x-appwrite": { "method": "getQueueStatsResources", "group": "queue", - "weight": 96, + "weight": 86, "cookies": false, "type": "", "demo": "health\/get-queue-stats-resources.md", @@ -15501,7 +15519,7 @@ "x-appwrite": { "method": "getQueueUsage", "group": "queue", - "weight": 97, + "weight": 87, "cookies": false, "type": "", "demo": "health\/get-queue-usage.md", @@ -15562,7 +15580,7 @@ "x-appwrite": { "method": "getQueueWebhooks", "group": "queue", - "weight": 85, + "weight": 75, "cookies": false, "type": "", "demo": "health\/get-queue-webhooks.md", @@ -15623,7 +15641,7 @@ "x-appwrite": { "method": "getStorage", "group": "storage", - "weight": 99, + "weight": 89, "cookies": false, "type": "", "demo": "health\/get-storage.md", @@ -15673,7 +15691,7 @@ "x-appwrite": { "method": "getStorageLocal", "group": "storage", - "weight": 98, + "weight": 88, "cookies": false, "type": "", "demo": "health\/get-storage-local.md", @@ -15723,7 +15741,7 @@ "x-appwrite": { "method": "getTime", "group": "health", - "weight": 84, + "weight": 74, "cookies": false, "type": "", "demo": "health\/get-time.md", @@ -15773,7 +15791,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 71, + "weight": 61, "cookies": false, "type": "", "demo": "locale\/get.md", @@ -15826,7 +15844,7 @@ "x-appwrite": { "method": "listCodes", "group": null, - "weight": 72, + "weight": 62, "cookies": false, "type": "", "demo": "locale\/list-codes.md", @@ -15879,7 +15897,7 @@ "x-appwrite": { "method": "listContinents", "group": null, - "weight": 76, + "weight": 66, "cookies": false, "type": "", "demo": "locale\/list-continents.md", @@ -15932,7 +15950,7 @@ "x-appwrite": { "method": "listCountries", "group": null, - "weight": 73, + "weight": 63, "cookies": false, "type": "", "demo": "locale\/list-countries.md", @@ -15985,7 +16003,7 @@ "x-appwrite": { "method": "listCountriesEU", "group": null, - "weight": 74, + "weight": 64, "cookies": false, "type": "", "demo": "locale\/list-countries-eu.md", @@ -16038,7 +16056,7 @@ "x-appwrite": { "method": "listCountriesPhones", "group": null, - "weight": 75, + "weight": 65, "cookies": false, "type": "", "demo": "locale\/list-countries-phones.md", @@ -16091,7 +16109,7 @@ "x-appwrite": { "method": "listCurrencies", "group": null, - "weight": 77, + "weight": 67, "cookies": false, "type": "", "demo": "locale\/list-currencies.md", @@ -16144,7 +16162,7 @@ "x-appwrite": { "method": "listLanguages", "group": null, - "weight": 78, + "weight": 68, "cookies": false, "type": "", "demo": "locale\/list-languages.md", @@ -16197,7 +16215,7 @@ "x-appwrite": { "method": "listMessages", "group": "messages", - "weight": 308, + "weight": 298, "cookies": false, "type": "", "demo": "messaging\/list-messages.md", @@ -16282,7 +16300,7 @@ "x-appwrite": { "method": "createEmail", "group": "messages", - "weight": 305, + "weight": 295, "cookies": false, "type": "", "demo": "messaging\/create-email.md", @@ -16442,7 +16460,7 @@ "x-appwrite": { "method": "updateEmail", "group": "messages", - "weight": 312, + "weight": 302, "cookies": false, "type": "", "demo": "messaging\/update-email.md", @@ -16609,7 +16627,7 @@ "x-appwrite": { "method": "createPush", "group": "messages", - "weight": 307, + "weight": 297, "cookies": false, "type": "", "demo": "messaging\/create-push.md", @@ -16807,7 +16825,7 @@ "x-appwrite": { "method": "updatePush", "group": "messages", - "weight": 314, + "weight": 304, "cookies": false, "type": "", "demo": "messaging\/update-push.md", @@ -17020,7 +17038,7 @@ "x-appwrite": { "method": "createSms", "group": "messages", - "weight": 306, + "weight": 296, "cookies": false, "type": "", "demo": "messaging\/create-sms.md", @@ -17210,7 +17228,7 @@ "x-appwrite": { "method": "updateSms", "group": "messages", - "weight": 313, + "weight": 303, "cookies": false, "type": "", "demo": "messaging\/update-sms.md", @@ -17399,7 +17417,7 @@ "x-appwrite": { "method": "getMessage", "group": "messages", - "weight": 311, + "weight": 301, "cookies": false, "type": "", "demo": "messaging\/get-message.md", @@ -17455,7 +17473,7 @@ "x-appwrite": { "method": "delete", "group": "messages", - "weight": 315, + "weight": 305, "cookies": false, "type": "", "demo": "messaging\/delete.md", @@ -17516,7 +17534,7 @@ "x-appwrite": { "method": "listMessageLogs", "group": "logs", - "weight": 309, + "weight": 299, "cookies": false, "type": "", "demo": "messaging\/list-message-logs.md", @@ -17598,7 +17616,7 @@ "x-appwrite": { "method": "listTargets", "group": "messages", - "weight": 310, + "weight": 300, "cookies": false, "type": "", "demo": "messaging\/list-targets.md", @@ -17680,7 +17698,7 @@ "x-appwrite": { "method": "listProviders", "group": "providers", - "weight": 279, + "weight": 269, "cookies": false, "type": "", "demo": "messaging\/list-providers.md", @@ -17765,7 +17783,7 @@ "x-appwrite": { "method": "createApnsProvider", "group": "providers", - "weight": 278, + "weight": 268, "cookies": false, "type": "", "demo": "messaging\/create-apns-provider.md", @@ -17954,7 +17972,7 @@ "x-appwrite": { "method": "updateApnsProvider", "group": "providers", - "weight": 292, + "weight": 282, "cookies": false, "type": "", "demo": "messaging\/update-apns-provider.md", @@ -18140,7 +18158,7 @@ "x-appwrite": { "method": "createFcmProvider", "group": "providers", - "weight": 277, + "weight": 267, "cookies": false, "type": "", "demo": "messaging\/create-fcm-provider.md", @@ -18298,7 +18316,7 @@ "x-appwrite": { "method": "updateFcmProvider", "group": "providers", - "weight": 291, + "weight": 281, "cookies": false, "type": "", "demo": "messaging\/update-fcm-provider.md", @@ -18452,7 +18470,7 @@ "x-appwrite": { "method": "createMailgunProvider", "group": "providers", - "weight": 268, + "weight": 258, "cookies": false, "type": "", "demo": "messaging\/create-mailgun-provider.md", @@ -18582,7 +18600,7 @@ "x-appwrite": { "method": "updateMailgunProvider", "group": "providers", - "weight": 282, + "weight": 272, "cookies": false, "type": "", "demo": "messaging\/update-mailgun-provider.md", @@ -18710,7 +18728,7 @@ "x-appwrite": { "method": "createMsg91Provider", "group": "providers", - "weight": 272, + "weight": 262, "cookies": false, "type": "", "demo": "messaging\/create-msg-91-provider.md", @@ -18815,7 +18833,7 @@ "x-appwrite": { "method": "updateMsg91Provider", "group": "providers", - "weight": 286, + "weight": 276, "cookies": false, "type": "", "demo": "messaging\/update-msg-91-provider.md", @@ -18918,7 +18936,7 @@ "x-appwrite": { "method": "createResendProvider", "group": "providers", - "weight": 270, + "weight": 260, "cookies": false, "type": "", "demo": "messaging\/create-resend-provider.md", @@ -19035,7 +19053,7 @@ "x-appwrite": { "method": "updateResendProvider", "group": "providers", - "weight": 284, + "weight": 274, "cookies": false, "type": "", "demo": "messaging\/update-resend-provider.md", @@ -19150,7 +19168,7 @@ "x-appwrite": { "method": "createSendgridProvider", "group": "providers", - "weight": 269, + "weight": 259, "cookies": false, "type": "", "demo": "messaging\/create-sendgrid-provider.md", @@ -19267,7 +19285,7 @@ "x-appwrite": { "method": "updateSendgridProvider", "group": "providers", - "weight": 283, + "weight": 273, "cookies": false, "type": "", "demo": "messaging\/update-sendgrid-provider.md", @@ -19382,7 +19400,7 @@ "x-appwrite": { "method": "createSmtpProvider", "group": "providers", - "weight": 271, + "weight": 261, "cookies": false, "type": "", "demo": "messaging\/create-smtp-provider.md", @@ -19629,7 +19647,7 @@ "x-appwrite": { "method": "updateSmtpProvider", "group": "providers", - "weight": 285, + "weight": 275, "cookies": false, "type": "", "demo": "messaging\/update-smtp-provider.md", @@ -19871,7 +19889,7 @@ "x-appwrite": { "method": "createTelesignProvider", "group": "providers", - "weight": 273, + "weight": 263, "cookies": false, "type": "", "demo": "messaging\/create-telesign-provider.md", @@ -19976,7 +19994,7 @@ "x-appwrite": { "method": "updateTelesignProvider", "group": "providers", - "weight": 287, + "weight": 277, "cookies": false, "type": "", "demo": "messaging\/update-telesign-provider.md", @@ -20079,7 +20097,7 @@ "x-appwrite": { "method": "createTextmagicProvider", "group": "providers", - "weight": 274, + "weight": 264, "cookies": false, "type": "", "demo": "messaging\/create-textmagic-provider.md", @@ -20184,7 +20202,7 @@ "x-appwrite": { "method": "updateTextmagicProvider", "group": "providers", - "weight": 288, + "weight": 278, "cookies": false, "type": "", "demo": "messaging\/update-textmagic-provider.md", @@ -20287,7 +20305,7 @@ "x-appwrite": { "method": "createTwilioProvider", "group": "providers", - "weight": 275, + "weight": 265, "cookies": false, "type": "", "demo": "messaging\/create-twilio-provider.md", @@ -20392,7 +20410,7 @@ "x-appwrite": { "method": "updateTwilioProvider", "group": "providers", - "weight": 289, + "weight": 279, "cookies": false, "type": "", "demo": "messaging\/update-twilio-provider.md", @@ -20495,7 +20513,7 @@ "x-appwrite": { "method": "createVonageProvider", "group": "providers", - "weight": 276, + "weight": 266, "cookies": false, "type": "", "demo": "messaging\/create-vonage-provider.md", @@ -20600,7 +20618,7 @@ "x-appwrite": { "method": "updateVonageProvider", "group": "providers", - "weight": 290, + "weight": 280, "cookies": false, "type": "", "demo": "messaging\/update-vonage-provider.md", @@ -20701,7 +20719,7 @@ "x-appwrite": { "method": "getProvider", "group": "providers", - "weight": 281, + "weight": 271, "cookies": false, "type": "", "demo": "messaging\/get-provider.md", @@ -20757,7 +20775,7 @@ "x-appwrite": { "method": "deleteProvider", "group": "providers", - "weight": 293, + "weight": 283, "cookies": false, "type": "", "demo": "messaging\/delete-provider.md", @@ -20818,7 +20836,7 @@ "x-appwrite": { "method": "listProviderLogs", "group": "providers", - "weight": 280, + "weight": 270, "cookies": false, "type": "", "demo": "messaging\/list-provider-logs.md", @@ -20900,7 +20918,7 @@ "x-appwrite": { "method": "listSubscriberLogs", "group": "subscribers", - "weight": 302, + "weight": 292, "cookies": false, "type": "", "demo": "messaging\/list-subscriber-logs.md", @@ -20982,7 +21000,7 @@ "x-appwrite": { "method": "listTopics", "group": "topics", - "weight": 295, + "weight": 285, "cookies": false, "type": "", "demo": "messaging\/list-topics.md", @@ -21065,7 +21083,7 @@ "x-appwrite": { "method": "createTopic", "group": "topics", - "weight": 294, + "weight": 284, "cookies": false, "type": "", "demo": "messaging\/create-topic.md", @@ -21154,7 +21172,7 @@ "x-appwrite": { "method": "getTopic", "group": "topics", - "weight": 297, + "weight": 287, "cookies": false, "type": "", "demo": "messaging\/get-topic.md", @@ -21215,7 +21233,7 @@ "x-appwrite": { "method": "updateTopic", "group": "topics", - "weight": 298, + "weight": 288, "cookies": false, "type": "", "demo": "messaging\/update-topic.md", @@ -21297,7 +21315,7 @@ "x-appwrite": { "method": "deleteTopic", "group": "topics", - "weight": 299, + "weight": 289, "cookies": false, "type": "", "demo": "messaging\/delete-topic.md", @@ -21358,7 +21376,7 @@ "x-appwrite": { "method": "listTopicLogs", "group": "topics", - "weight": 296, + "weight": 286, "cookies": false, "type": "", "demo": "messaging\/list-topic-logs.md", @@ -21440,7 +21458,7 @@ "x-appwrite": { "method": "listSubscribers", "group": "subscribers", - "weight": 301, + "weight": 291, "cookies": false, "type": "", "demo": "messaging\/list-subscribers.md", @@ -21531,7 +21549,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 300, + "weight": 290, "cookies": false, "type": "", "demo": "messaging\/create-subscriber.md", @@ -21620,7 +21638,7 @@ "x-appwrite": { "method": "getSubscriber", "group": "subscribers", - "weight": 303, + "weight": 293, "cookies": false, "type": "", "demo": "messaging\/get-subscriber.md", @@ -21684,7 +21702,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 304, + "weight": 294, "cookies": false, "type": "", "demo": "messaging\/delete-subscriber.md", @@ -24047,7 +24065,7 @@ "x-appwrite": { "method": "listBuckets", "group": "buckets", - "weight": 156, + "weight": 146, "cookies": false, "type": "", "demo": "storage\/list-buckets.md", @@ -24129,7 +24147,7 @@ "x-appwrite": { "method": "createBucket", "group": "buckets", - "weight": 155, + "weight": 145, "cookies": false, "type": "", "demo": "storage\/create-bucket.md", @@ -24274,7 +24292,7 @@ "x-appwrite": { "method": "getBucket", "group": "buckets", - "weight": 157, + "weight": 147, "cookies": false, "type": "", "demo": "storage\/get-bucket.md", @@ -24334,7 +24352,7 @@ "x-appwrite": { "method": "updateBucket", "group": "buckets", - "weight": 158, + "weight": 148, "cookies": false, "type": "", "demo": "storage\/update-bucket.md", @@ -24475,7 +24493,7 @@ "x-appwrite": { "method": "deleteBucket", "group": "buckets", - "weight": 159, + "weight": 149, "cookies": false, "type": "", "demo": "storage\/delete-bucket.md", @@ -24535,7 +24553,7 @@ "x-appwrite": { "method": "listFiles", "group": "files", - "weight": 161, + "weight": 151, "cookies": false, "type": "", "demo": "storage\/list-files.md", @@ -24628,7 +24646,7 @@ "x-appwrite": { "method": "createFile", "group": "files", - "weight": 160, + "weight": 150, "cookies": false, "type": "upload", "demo": "storage\/create-file.md", @@ -24719,7 +24737,7 @@ "x-appwrite": { "method": "getFile", "group": "files", - "weight": 162, + "weight": 152, "cookies": false, "type": "", "demo": "storage\/get-file.md", @@ -24790,7 +24808,7 @@ "x-appwrite": { "method": "updateFile", "group": "files", - "weight": 167, + "weight": 157, "cookies": false, "type": "", "demo": "storage\/update-file.md", @@ -24882,7 +24900,7 @@ "x-appwrite": { "method": "deleteFile", "group": "files", - "weight": 168, + "weight": 158, "cookies": false, "type": "", "demo": "storage\/delete-file.md", @@ -24953,7 +24971,7 @@ "x-appwrite": { "method": "getFileDownload", "group": "files", - "weight": 164, + "weight": 154, "cookies": false, "type": "location", "demo": "storage\/get-file-download.md", @@ -25033,7 +25051,7 @@ "x-appwrite": { "method": "getFilePreview", "group": "files", - "weight": 163, + "weight": 153, "cookies": false, "type": "location", "demo": "storage\/get-file-preview.md", @@ -25241,7 +25259,7 @@ "x-appwrite": { "method": "getFileView", "group": "files", - "weight": 165, + "weight": 155, "cookies": false, "type": "location", "demo": "storage\/get-file-view.md", @@ -26296,6 +26314,24 @@ "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", "default": true, "x-example": false + }, + "columns": { + "type": "array", + "description": "Array of column definitions to create. Each column should contain: key (string), type (string: string, integer, float, boolean, datetime, relationship), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.", + "default": [], + "x-example": null, + "items": { + "type": "object" + } + }, + "indexes": { + "type": "array", + "description": "Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of column keys), orders (array of ASC\/DESC, optional), and lengths (array of integers, optional).", + "default": [], + "x-example": null, + "items": { + "type": "object" + } } }, "required": [ @@ -31552,7 +31588,7 @@ "x-appwrite": { "method": "list", "group": "teams", - "weight": 172, + "weight": 162, "cookies": false, "type": "", "demo": "teams\/list.md", @@ -31637,7 +31673,7 @@ "x-appwrite": { "method": "create", "group": "teams", - "weight": 171, + "weight": 161, "cookies": false, "type": "", "demo": "teams\/create.md", @@ -31728,7 +31764,7 @@ "x-appwrite": { "method": "get", "group": "teams", - "weight": 173, + "weight": 163, "cookies": false, "type": "", "demo": "teams\/get.md", @@ -31791,7 +31827,7 @@ "x-appwrite": { "method": "updateName", "group": "teams", - "weight": 175, + "weight": 165, "cookies": false, "type": "", "demo": "teams\/update-name.md", @@ -31867,7 +31903,7 @@ "x-appwrite": { "method": "delete", "group": "teams", - "weight": 177, + "weight": 167, "cookies": false, "type": "", "demo": "teams\/delete.md", @@ -31930,7 +31966,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 179, + "weight": 169, "cookies": false, "type": "", "demo": "teams\/list-memberships.md", @@ -32023,7 +32059,7 @@ "x-appwrite": { "method": "createMembership", "group": "memberships", - "weight": 178, + "weight": 168, "cookies": false, "type": "", "demo": "teams\/create-membership.md", @@ -32137,7 +32173,7 @@ "x-appwrite": { "method": "getMembership", "group": "memberships", - "weight": 180, + "weight": 170, "cookies": false, "type": "", "demo": "teams\/get-membership.md", @@ -32208,7 +32244,7 @@ "x-appwrite": { "method": "updateMembership", "group": "memberships", - "weight": 181, + "weight": 171, "cookies": false, "type": "", "demo": "teams\/update-membership.md", @@ -32295,7 +32331,7 @@ "x-appwrite": { "method": "deleteMembership", "group": "memberships", - "weight": 183, + "weight": 173, "cookies": false, "type": "", "demo": "teams\/delete-membership.md", @@ -32368,7 +32404,7 @@ "x-appwrite": { "method": "updateMembershipStatus", "group": "memberships", - "weight": 182, + "weight": 172, "cookies": false, "type": "", "demo": "teams\/update-membership-status.md", @@ -32463,7 +32499,7 @@ "x-appwrite": { "method": "getPrefs", "group": "teams", - "weight": 174, + "weight": 164, "cookies": false, "type": "", "demo": "teams\/get-prefs.md", @@ -32525,7 +32561,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "teams", - "weight": 176, + "weight": 166, "cookies": false, "type": "", "demo": "teams\/update-prefs.md", @@ -32974,7 +33010,7 @@ "x-appwrite": { "method": "list", "group": "users", - "weight": 194, + "weight": 184, "cookies": false, "type": "", "demo": "users\/list.md", @@ -33056,7 +33092,7 @@ "x-appwrite": { "method": "create", "group": "users", - "weight": 185, + "weight": 175, "cookies": false, "type": "", "demo": "users\/create.md", @@ -33154,7 +33190,7 @@ "x-appwrite": { "method": "createArgon2User", "group": "users", - "weight": 188, + "weight": 178, "cookies": false, "type": "", "demo": "users\/create-argon-2-user.md", @@ -33246,7 +33282,7 @@ "x-appwrite": { "method": "createBcryptUser", "group": "users", - "weight": 186, + "weight": 176, "cookies": false, "type": "", "demo": "users\/create-bcrypt-user.md", @@ -33336,7 +33372,7 @@ "x-appwrite": { "method": "listIdentities", "group": "identities", - "weight": 202, + "weight": 192, "cookies": false, "type": "", "demo": "users\/list-identities.md", @@ -33415,7 +33451,7 @@ "x-appwrite": { "method": "deleteIdentity", "group": "identities", - "weight": 225, + "weight": 215, "cookies": false, "type": "", "demo": "users\/delete-identity.md", @@ -33477,7 +33513,7 @@ "x-appwrite": { "method": "createMD5User", "group": "users", - "weight": 187, + "weight": 177, "cookies": false, "type": "", "demo": "users\/create-md-5-user.md", @@ -33569,7 +33605,7 @@ "x-appwrite": { "method": "createPHPassUser", "group": "users", - "weight": 190, + "weight": 180, "cookies": false, "type": "", "demo": "users\/create-ph-pass-user.md", @@ -33661,7 +33697,7 @@ "x-appwrite": { "method": "createScryptUser", "group": "users", - "weight": 191, + "weight": 181, "cookies": false, "type": "", "demo": "users\/create-scrypt-user.md", @@ -33788,7 +33824,7 @@ "x-appwrite": { "method": "createScryptModifiedUser", "group": "users", - "weight": 192, + "weight": 182, "cookies": false, "type": "", "demo": "users\/create-scrypt-modified-user.md", @@ -33901,7 +33937,7 @@ "x-appwrite": { "method": "createSHAUser", "group": "users", - "weight": 189, + "weight": 179, "cookies": false, "type": "", "demo": "users\/create-sha-user.md", @@ -34012,7 +34048,7 @@ "x-appwrite": { "method": "get", "group": "users", - "weight": 195, + "weight": 185, "cookies": false, "type": "", "demo": "users\/get.md", @@ -34067,7 +34103,7 @@ "x-appwrite": { "method": "delete", "group": "users", - "weight": 223, + "weight": 213, "cookies": false, "type": "", "demo": "users\/delete.md", @@ -34129,7 +34165,7 @@ "x-appwrite": { "method": "updateEmail", "group": "users", - "weight": 208, + "weight": 198, "cookies": false, "type": "", "demo": "users\/update-email.md", @@ -34209,7 +34245,7 @@ "x-appwrite": { "method": "createJWT", "group": "sessions", - "weight": 226, + "weight": 216, "cookies": false, "type": "", "demo": "users\/create-jwt.md", @@ -34292,7 +34328,7 @@ "x-appwrite": { "method": "updateLabels", "group": "users", - "weight": 204, + "weight": 194, "cookies": false, "type": "", "demo": "users\/update-labels.md", @@ -34373,7 +34409,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 200, + "weight": 190, "cookies": false, "type": "", "demo": "users\/list-logs.md", @@ -34454,7 +34490,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 199, + "weight": 189, "cookies": false, "type": "", "demo": "users\/list-memberships.md", @@ -34546,7 +34582,7 @@ "x-appwrite": { "method": "updateMfa", "group": "users", - "weight": 213, + "weight": 203, "cookies": false, "type": "", "demo": "users\/update-mfa.md", @@ -34681,7 +34717,7 @@ "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", - "weight": 218, + "weight": 208, "cookies": false, "type": "", "demo": "users\/delete-mfa-authenticator.md", @@ -34812,7 +34848,7 @@ "x-appwrite": { "method": "listMfaFactors", "group": "mfa", - "weight": 214, + "weight": 204, "cookies": false, "type": "", "demo": "users\/list-mfa-factors.md", @@ -34928,7 +34964,7 @@ "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", - "weight": 215, + "weight": 205, "cookies": false, "type": "", "demo": "users\/get-mfa-recovery-codes.md", @@ -35044,7 +35080,7 @@ "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", - "weight": 217, + "weight": 207, "cookies": false, "type": "", "demo": "users\/update-mfa-recovery-codes.md", @@ -35160,7 +35196,7 @@ "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", - "weight": 216, + "weight": 206, "cookies": false, "type": "", "demo": "users\/create-mfa-recovery-codes.md", @@ -35278,7 +35314,7 @@ "x-appwrite": { "method": "updateName", "group": "users", - "weight": 206, + "weight": 196, "cookies": false, "type": "", "demo": "users\/update-name.md", @@ -35358,7 +35394,7 @@ "x-appwrite": { "method": "updatePassword", "group": "users", - "weight": 207, + "weight": 197, "cookies": false, "type": "", "demo": "users\/update-password.md", @@ -35438,7 +35474,7 @@ "x-appwrite": { "method": "updatePhone", "group": "users", - "weight": 209, + "weight": 199, "cookies": false, "type": "", "demo": "users\/update-phone.md", @@ -35516,7 +35552,7 @@ "x-appwrite": { "method": "getPrefs", "group": "users", - "weight": 196, + "weight": 186, "cookies": false, "type": "", "demo": "users\/get-prefs.md", @@ -35576,7 +35612,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "users", - "weight": 211, + "weight": 201, "cookies": false, "type": "", "demo": "users\/update-prefs.md", @@ -35654,7 +35690,7 @@ "x-appwrite": { "method": "listSessions", "group": "sessions", - "weight": 198, + "weight": 188, "cookies": false, "type": "", "demo": "users\/list-sessions.md", @@ -35723,7 +35759,7 @@ "x-appwrite": { "method": "createSession", "group": "sessions", - "weight": 219, + "weight": 209, "cookies": false, "type": "", "demo": "users\/create-session.md", @@ -35778,7 +35814,7 @@ "x-appwrite": { "method": "deleteSessions", "group": "sessions", - "weight": 222, + "weight": 212, "cookies": false, "type": "", "demo": "users\/delete-sessions.md", @@ -35835,7 +35871,7 @@ "x-appwrite": { "method": "deleteSession", "group": "sessions", - "weight": 221, + "weight": 211, "cookies": false, "type": "", "demo": "users\/delete-session.md", @@ -35905,7 +35941,7 @@ "x-appwrite": { "method": "updateStatus", "group": "users", - "weight": 203, + "weight": 193, "cookies": false, "type": "", "demo": "users\/update-status.md", @@ -35983,7 +36019,7 @@ "x-appwrite": { "method": "listTargets", "group": "targets", - "weight": 201, + "weight": 191, "cookies": false, "type": "", "demo": "users\/list-targets.md", @@ -36065,7 +36101,7 @@ "x-appwrite": { "method": "createTarget", "group": "targets", - "weight": 193, + "weight": 183, "cookies": false, "type": "", "demo": "users\/create-target.md", @@ -36177,7 +36213,7 @@ "x-appwrite": { "method": "getTarget", "group": "targets", - "weight": 197, + "weight": 187, "cookies": false, "type": "", "demo": "users\/get-target.md", @@ -36246,7 +36282,7 @@ "x-appwrite": { "method": "updateTarget", "group": "targets", - "weight": 212, + "weight": 202, "cookies": false, "type": "", "demo": "users\/update-target.md", @@ -36337,7 +36373,7 @@ "x-appwrite": { "method": "deleteTarget", "group": "targets", - "weight": 224, + "weight": 214, "cookies": false, "type": "", "demo": "users\/delete-target.md", @@ -36408,7 +36444,7 @@ "x-appwrite": { "method": "createToken", "group": "sessions", - "weight": 220, + "weight": 210, "cookies": false, "type": "", "demo": "users\/create-token.md", @@ -36491,7 +36527,7 @@ "x-appwrite": { "method": "updateEmailVerification", "group": "users", - "weight": 210, + "weight": 200, "cookies": false, "type": "", "demo": "users\/update-email-verification.md", @@ -36571,7 +36607,7 @@ "x-appwrite": { "method": "updatePhoneVerification", "group": "users", - "weight": 205, + "weight": 195, "cookies": false, "type": "", "demo": "users\/update-phone-verification.md", From a26efc7aa57dee4c623007b882a88c0752ae5c99 Mon Sep 17 00:00:00 2001 From: Hemachandar Date: Fri, 5 Dec 2025 17:48:10 +0530 Subject: [PATCH 15/20] Update utopia-php/dns version --- composer.json | 2 +- composer.lock | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/composer.json b/composer.json index 25d3c06c8d..d32b739311 100644 --- a/composer.json +++ b/composer.json @@ -56,7 +56,7 @@ "utopia-php/detector": "0.2.*", "utopia-php/domains": "0.9.*", "utopia-php/emails": "0.6.*", - "utopia-php/dns": "1.1.*", + "utopia-php/dns": "1.4.*", "utopia-php/dsn": "0.2.1", "utopia-php/framework": "0.33.*", "utopia-php/fetch": "0.4.*", diff --git a/composer.lock b/composer.lock index 4dccb29a1a..6fec82ed5b 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "0cad126c9b41c0d496462ba03ff36d7b", + "content-hash": "7c9cb03eb5267f1e7a3ffc037ae22b6a", "packages": [ { "name": "adhocore/jwt", @@ -3999,16 +3999,16 @@ }, { "name": "utopia-php/dns", - "version": "1.1.4", + "version": "1.4.0", "source": { "type": "git", "url": "https://github.com/utopia-php/dns.git", - "reference": "eea6b9299a1420ae6c574f16eb1e9da8689ac56b" + "reference": "dce3453364a4524b7250db8d8eb74820b814409e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/dns/zipball/eea6b9299a1420ae6c574f16eb1e9da8689ac56b", - "reference": "eea6b9299a1420ae6c574f16eb1e9da8689ac56b", + "url": "https://api.github.com/repos/utopia-php/dns/zipball/dce3453364a4524b7250db8d8eb74820b814409e", + "reference": "dce3453364a4524b7250db8d8eb74820b814409e", "shasum": "" }, "require": { @@ -4050,9 +4050,9 @@ ], "support": { "issues": "https://github.com/utopia-php/dns/issues", - "source": "https://github.com/utopia-php/dns/tree/1.1.4" + "source": "https://github.com/utopia-php/dns/tree/1.4.0" }, - "time": "2025-11-26T13:38:10+00:00" + "time": "2025-12-05T10:09:00+00:00" }, { "name": "utopia-php/domains", From 425bd514c27bd600b7f3f5688594c55c7d0902bb Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Mon, 8 Dec 2025 18:54:46 +1300 Subject: [PATCH 16/20] Block array indexes --- .../Databases/Collections/Indexes/Create.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Create.php index 9fb438d577..1d3bde7987 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Create.php @@ -108,8 +108,10 @@ class Create extends Action throw new Exception($this->getLimitException(), 'Index limit exceeded'); } - // Convert Document array to array of attribute metadata - $oldAttributes = \array_map(fn ($a) => $a->getArrayCopy(), $collection->getAttribute('attributes')); + $oldAttributes = \array_map( + fn ($a) => $a->getArrayCopy(), + $collection->getAttribute('attributes') + ); $oldAttributes[] = [ 'key' => '$id', @@ -120,7 +122,6 @@ class Create extends Action 'default' => null, 'size' => Database::LENGTH_KEY ]; - $oldAttributes[] = [ 'key' => '$createdAt', 'type' => Database::VAR_DATETIME, @@ -131,7 +132,6 @@ class Create extends Action 'default' => null, 'size' => 0 ]; - $oldAttributes[] = [ 'key' => '$updatedAt', 'type' => Database::VAR_DATETIME, @@ -145,7 +145,6 @@ class Create extends Action $contextType = $this->getParentContext(); foreach ($attributes as $i => $attribute) { - // find attribute metadata in collection document $attributeIndex = \array_search($attribute, array_column($oldAttributes, 'key')); if ($attributeIndex === false) { @@ -160,7 +159,6 @@ class Create extends Action throw new Exception($this->getParentInvalidTypeException(), "Cannot create an index for a relationship $contextType: " . $oldAttributes[$attributeIndex]['key']); } - // Ensure attribute is available if ($attributeStatus !== 'available') { $contextType = ucfirst($contextType); throw new Exception($this->getParentNotAvailableException(), "$contextType not available: " . $oldAttributes[$attributeIndex]['key']); @@ -171,8 +169,10 @@ class Create extends Action } if ($attributeArray === true) { - $lengths[$i] = Database::MAX_ARRAY_INDEX_LENGTH; - $orders[$i] = null; + // Because of a bug in MySQL, we cannot create indexes on array attributes for now, otherwise queries break. + throw new Exception(Exception::GENERAL_SERVER_ERROR, 'Creating indexes on array values is not currently supported.'); + //$lengths[$i] = Database::MAX_ARRAY_INDEX_LENGTH; + //$orders[$i] = null; } } From 5df786be4b0351296df0973cebd70f4948fe6080 Mon Sep 17 00:00:00 2001 From: fogelito Date: Mon, 8 Dec 2025 08:49:28 +0200 Subject: [PATCH 17/20] utopia-php/migration (1.3.6 => 1.3.7) --- composer.lock | 110 +++++++++++++++++++++++++------------------------- 1 file changed, 55 insertions(+), 55 deletions(-) diff --git a/composer.lock b/composer.lock index 4dccb29a1a..b910e64c84 100644 --- a/composer.lock +++ b/composer.lock @@ -756,16 +756,16 @@ }, { "name": "google/protobuf", - "version": "v4.33.1", + "version": "v4.33.2", "source": { "type": "git", "url": "https://github.com/protocolbuffers/protobuf-php.git", - "reference": "0cd73ccf0cd26c3e72299cce1ea6144091a57e12" + "reference": "fbd96b7bf1343f4b0d8fb358526c7ba4d72f1318" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/protocolbuffers/protobuf-php/zipball/0cd73ccf0cd26c3e72299cce1ea6144091a57e12", - "reference": "0cd73ccf0cd26c3e72299cce1ea6144091a57e12", + "url": "https://api.github.com/repos/protocolbuffers/protobuf-php/zipball/fbd96b7bf1343f4b0d8fb358526c7ba4d72f1318", + "reference": "fbd96b7bf1343f4b0d8fb358526c7ba4d72f1318", "shasum": "" }, "require": { @@ -794,9 +794,9 @@ "proto" ], "support": { - "source": "https://github.com/protocolbuffers/protobuf-php/tree/v4.33.1" + "source": "https://github.com/protocolbuffers/protobuf-php/tree/v4.33.2" }, - "time": "2025-11-12T21:58:05+00:00" + "time": "2025-12-05T22:12:22+00:00" }, { "name": "league/csv", @@ -2673,16 +2673,16 @@ }, { "name": "symfony/http-client", - "version": "v7.4.0", + "version": "v7.4.1", "source": { "type": "git", "url": "https://github.com/symfony/http-client.git", - "reference": "ee5e0e0139ab506f6063a230e631bed677c650a4" + "reference": "26cc224ea7103dda90e9694d9e139a389092d007" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-client/zipball/ee5e0e0139ab506f6063a230e631bed677c650a4", - "reference": "ee5e0e0139ab506f6063a230e631bed677c650a4", + "url": "https://api.github.com/repos/symfony/http-client/zipball/26cc224ea7103dda90e9694d9e139a389092d007", + "reference": "26cc224ea7103dda90e9694d9e139a389092d007", "shasum": "" }, "require": { @@ -2750,7 +2750,7 @@ "http" ], "support": { - "source": "https://github.com/symfony/http-client/tree/v7.4.0" + "source": "https://github.com/symfony/http-client/tree/v7.4.1" }, "funding": [ { @@ -2770,7 +2770,7 @@ "type": "tidelift" } ], - "time": "2025-11-20T12:32:50+00:00" + "time": "2025-12-04T21:12:57+00:00" }, { "name": "symfony/http-client-contracts", @@ -4513,16 +4513,16 @@ }, { "name": "utopia-php/migration", - "version": "1.3.6", + "version": "1.3.7", "source": { "type": "git", "url": "https://github.com/utopia-php/migration.git", - "reference": "4abe70cc242bbffebfa377e4126ee2a4a1c9ef7e" + "reference": "409983bc2a9cf53a8a3dc6c23d8b1dee1950b499" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/migration/zipball/4abe70cc242bbffebfa377e4126ee2a4a1c9ef7e", - "reference": "4abe70cc242bbffebfa377e4126ee2a4a1c9ef7e", + "url": "https://api.github.com/repos/utopia-php/migration/zipball/409983bc2a9cf53a8a3dc6c23d8b1dee1950b499", + "reference": "409983bc2a9cf53a8a3dc6c23d8b1dee1950b499", "shasum": "" }, "require": { @@ -4562,9 +4562,9 @@ ], "support": { "issues": "https://github.com/utopia-php/migration/issues", - "source": "https://github.com/utopia-php/migration/tree/1.3.6" + "source": "https://github.com/utopia-php/migration/tree/1.3.7" }, - "time": "2025-11-25T11:36:57+00:00" + "time": "2025-12-05T05:02:31+00:00" }, { "name": "utopia-php/mongo", @@ -4952,16 +4952,16 @@ }, { "name": "utopia-php/storage", - "version": "0.18.14", + "version": "0.18.16", "source": { "type": "git", "url": "https://github.com/utopia-php/storage.git", - "reference": "4f14ec952c6f4006dd0613e55bbf7631814fbc00" + "reference": "0c7b8ad68de8e1eb23ccc8af9f27a30eb832930f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/storage/zipball/4f14ec952c6f4006dd0613e55bbf7631814fbc00", - "reference": "4f14ec952c6f4006dd0613e55bbf7631814fbc00", + "url": "https://api.github.com/repos/utopia-php/storage/zipball/0c7b8ad68de8e1eb23ccc8af9f27a30eb832930f", + "reference": "0c7b8ad68de8e1eb23ccc8af9f27a30eb832930f", "shasum": "" }, "require": { @@ -5004,9 +5004,9 @@ ], "support": { "issues": "https://github.com/utopia-php/storage/issues", - "source": "https://github.com/utopia-php/storage/tree/0.18.14" + "source": "https://github.com/utopia-php/storage/tree/0.18.16" }, - "time": "2025-10-07T10:21:47+00:00" + "time": "2025-12-03T02:15:45+00:00" }, { "name": "utopia-php/swoole", @@ -5960,16 +5960,16 @@ }, { "name": "nikic/php-parser", - "version": "v5.6.2", + "version": "v5.7.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "3a454ca033b9e06b63282ce19562e892747449bb" + "reference": "dca41cd15c2ac9d055ad70dbfd011130757d1f82" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/3a454ca033b9e06b63282ce19562e892747449bb", - "reference": "3a454ca033b9e06b63282ce19562e892747449bb", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/dca41cd15c2ac9d055ad70dbfd011130757d1f82", + "reference": "dca41cd15c2ac9d055ad70dbfd011130757d1f82", "shasum": "" }, "require": { @@ -6012,9 +6012,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v5.6.2" + "source": "https://github.com/nikic/PHP-Parser/tree/v5.7.0" }, - "time": "2025-10-21T19:32:17+00:00" + "time": "2025-12-06T11:56:16+00:00" }, { "name": "phar-io/manifest", @@ -6663,16 +6663,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.6.29", + "version": "9.6.31", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "9ecfec57835a5581bc888ea7e13b51eb55ab9dd3" + "reference": "945d0b7f346a084ce5549e95289962972c4272e5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/9ecfec57835a5581bc888ea7e13b51eb55ab9dd3", - "reference": "9ecfec57835a5581bc888ea7e13b51eb55ab9dd3", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/945d0b7f346a084ce5549e95289962972c4272e5", + "reference": "945d0b7f346a084ce5549e95289962972c4272e5", "shasum": "" }, "require": { @@ -6746,7 +6746,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.29" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.31" }, "funding": [ { @@ -6770,7 +6770,7 @@ "type": "tidelift" } ], - "time": "2025-09-24T06:29:11+00:00" + "time": "2025-12-06T07:45:52+00:00" }, { "name": "psr/cache", @@ -7930,16 +7930,16 @@ }, { "name": "symfony/console", - "version": "v8.0.0", + "version": "v8.0.1", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "307d3cf852f5ead3618ac60ecbedbdd512c348b1" + "reference": "fcb73f69d655b48fcb894a262f074218df08bd58" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/307d3cf852f5ead3618ac60ecbedbdd512c348b1", - "reference": "307d3cf852f5ead3618ac60ecbedbdd512c348b1", + "url": "https://api.github.com/repos/symfony/console/zipball/fcb73f69d655b48fcb894a262f074218df08bd58", + "reference": "fcb73f69d655b48fcb894a262f074218df08bd58", "shasum": "" }, "require": { @@ -7996,7 +7996,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v8.0.0" + "source": "https://github.com/symfony/console/tree/v8.0.1" }, "funding": [ { @@ -8016,20 +8016,20 @@ "type": "tidelift" } ], - "time": "2025-11-21T13:19:49+00:00" + "time": "2025-12-05T15:25:33+00:00" }, { "name": "symfony/filesystem", - "version": "v8.0.0", + "version": "v8.0.1", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "7fc96ae83372620eaba3826874f46e26295768ca" + "reference": "d937d400b980523dc9ee946bb69972b5e619058d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/7fc96ae83372620eaba3826874f46e26295768ca", - "reference": "7fc96ae83372620eaba3826874f46e26295768ca", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/d937d400b980523dc9ee946bb69972b5e619058d", + "reference": "d937d400b980523dc9ee946bb69972b5e619058d", "shasum": "" }, "require": { @@ -8066,7 +8066,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v8.0.0" + "source": "https://github.com/symfony/filesystem/tree/v8.0.1" }, "funding": [ { @@ -8086,7 +8086,7 @@ "type": "tidelift" } ], - "time": "2025-11-05T14:36:47+00:00" + "time": "2025-12-01T09:13:36+00:00" }, { "name": "symfony/finder", @@ -8624,16 +8624,16 @@ }, { "name": "symfony/string", - "version": "v8.0.0", + "version": "v8.0.1", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "f929eccf09531078c243df72398560e32fa4cf4f" + "reference": "ba65a969ac918ce0cc3edfac6cdde847eba231dc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/f929eccf09531078c243df72398560e32fa4cf4f", - "reference": "f929eccf09531078c243df72398560e32fa4cf4f", + "url": "https://api.github.com/repos/symfony/string/zipball/ba65a969ac918ce0cc3edfac6cdde847eba231dc", + "reference": "ba65a969ac918ce0cc3edfac6cdde847eba231dc", "shasum": "" }, "require": { @@ -8690,7 +8690,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v8.0.0" + "source": "https://github.com/symfony/string/tree/v8.0.1" }, "funding": [ { @@ -8710,7 +8710,7 @@ "type": "tidelift" } ], - "time": "2025-09-11T14:37:55+00:00" + "time": "2025-12-01T09:13:36+00:00" }, { "name": "textalk/websocket", @@ -8942,7 +8942,7 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": {}, + "stability-flags": [], "prefer-stable": false, "prefer-lowest": false, "platform": { From d1b47a79162f6c5468e0bc6aa0f3102968ba607a Mon Sep 17 00:00:00 2001 From: fogelito Date: Mon, 8 Dec 2025 09:39:51 +0200 Subject: [PATCH 18/20] utopia-php/migration 1.3.8 --- composer.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/composer.lock b/composer.lock index b910e64c84..ba60db67e7 100644 --- a/composer.lock +++ b/composer.lock @@ -4513,16 +4513,16 @@ }, { "name": "utopia-php/migration", - "version": "1.3.7", + "version": "1.3.8", "source": { "type": "git", "url": "https://github.com/utopia-php/migration.git", - "reference": "409983bc2a9cf53a8a3dc6c23d8b1dee1950b499" + "reference": "f7b4823bff22edf83b63720cf2165a830b98d6b5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/migration/zipball/409983bc2a9cf53a8a3dc6c23d8b1dee1950b499", - "reference": "409983bc2a9cf53a8a3dc6c23d8b1dee1950b499", + "url": "https://api.github.com/repos/utopia-php/migration/zipball/f7b4823bff22edf83b63720cf2165a830b98d6b5", + "reference": "f7b4823bff22edf83b63720cf2165a830b98d6b5", "shasum": "" }, "require": { @@ -4562,9 +4562,9 @@ ], "support": { "issues": "https://github.com/utopia-php/migration/issues", - "source": "https://github.com/utopia-php/migration/tree/1.3.7" + "source": "https://github.com/utopia-php/migration/tree/1.3.8" }, - "time": "2025-12-05T05:02:31+00:00" + "time": "2025-12-08T07:37:32+00:00" }, { "name": "utopia-php/mongo", From 77917c8b46788ff5e44a39ee9fff83f27c1b7af8 Mon Sep 17 00:00:00 2001 From: fogelito Date: Mon, 8 Dec 2025 10:47:22 +0200 Subject: [PATCH 19/20] utopia-php/migration 1.3.9 --- composer.lock | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/composer.lock b/composer.lock index ba60db67e7..0182cfecf3 100644 --- a/composer.lock +++ b/composer.lock @@ -4264,29 +4264,29 @@ }, { "name": "utopia-php/framework", - "version": "0.33.33", + "version": "0.33.34", "source": { "type": "git", "url": "https://github.com/utopia-php/http.git", - "reference": "838e3a28276e73187bc34a314f014096dc92191b" + "reference": "76def92594c32504ec80eaacdb60ff8fad73c856" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/http/zipball/838e3a28276e73187bc34a314f014096dc92191b", - "reference": "838e3a28276e73187bc34a314f014096dc92191b", + "url": "https://api.github.com/repos/utopia-php/http/zipball/76def92594c32504ec80eaacdb60ff8fad73c856", + "reference": "76def92594c32504ec80eaacdb60ff8fad73c856", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.3", "utopia-php/compression": "0.1.*", "utopia-php/telemetry": "0.1.*", "utopia-php/validators": "0.1.*" }, "require-dev": { - "laravel/pint": "^1.2", - "phpbench/phpbench": "^1.2", - "phpstan/phpstan": "^1.10", - "phpunit/phpunit": "^9.5.25" + "laravel/pint": "1.*", + "phpbench/phpbench": "1.*", + "phpstan/phpstan": "1.*", + "phpunit/phpunit": "9.*" }, "type": "library", "autoload": { @@ -4306,9 +4306,9 @@ ], "support": { "issues": "https://github.com/utopia-php/http/issues", - "source": "https://github.com/utopia-php/http/tree/0.33.33" + "source": "https://github.com/utopia-php/http/tree/0.33.34" }, - "time": "2025-11-25T10:21:13+00:00" + "time": "2025-12-08T07:55:31+00:00" }, { "name": "utopia-php/image", @@ -4513,16 +4513,16 @@ }, { "name": "utopia-php/migration", - "version": "1.3.8", + "version": "1.3.9", "source": { "type": "git", "url": "https://github.com/utopia-php/migration.git", - "reference": "f7b4823bff22edf83b63720cf2165a830b98d6b5" + "reference": "c55ec67c74663190cda10fd79297422147be7e85" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/migration/zipball/f7b4823bff22edf83b63720cf2165a830b98d6b5", - "reference": "f7b4823bff22edf83b63720cf2165a830b98d6b5", + "url": "https://api.github.com/repos/utopia-php/migration/zipball/c55ec67c74663190cda10fd79297422147be7e85", + "reference": "c55ec67c74663190cda10fd79297422147be7e85", "shasum": "" }, "require": { @@ -4562,9 +4562,9 @@ ], "support": { "issues": "https://github.com/utopia-php/migration/issues", - "source": "https://github.com/utopia-php/migration/tree/1.3.8" + "source": "https://github.com/utopia-php/migration/tree/1.3.9" }, - "time": "2025-12-08T07:37:32+00:00" + "time": "2025-12-08T08:45:09+00:00" }, { "name": "utopia-php/mongo", From aec7f27ce45c57afa99e8b63ac085a84cc71de94 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Mon, 8 Dec 2025 23:20:40 +1300 Subject: [PATCH 20/20] Fix tests --- composer.lock | 143 +++++++++--------- .../Databases/Collections/Indexes/Create.php | 4 +- .../Databases/Legacy/DatabasesBase.php | 29 ++-- .../Databases/TablesDB/DatabasesBase.php | 16 +- 4 files changed, 96 insertions(+), 96 deletions(-) diff --git a/composer.lock b/composer.lock index 4dccb29a1a..8e88903694 100644 --- a/composer.lock +++ b/composer.lock @@ -756,16 +756,16 @@ }, { "name": "google/protobuf", - "version": "v4.33.1", + "version": "v4.33.2", "source": { "type": "git", "url": "https://github.com/protocolbuffers/protobuf-php.git", - "reference": "0cd73ccf0cd26c3e72299cce1ea6144091a57e12" + "reference": "fbd96b7bf1343f4b0d8fb358526c7ba4d72f1318" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/protocolbuffers/protobuf-php/zipball/0cd73ccf0cd26c3e72299cce1ea6144091a57e12", - "reference": "0cd73ccf0cd26c3e72299cce1ea6144091a57e12", + "url": "https://api.github.com/repos/protocolbuffers/protobuf-php/zipball/fbd96b7bf1343f4b0d8fb358526c7ba4d72f1318", + "reference": "fbd96b7bf1343f4b0d8fb358526c7ba4d72f1318", "shasum": "" }, "require": { @@ -794,9 +794,9 @@ "proto" ], "support": { - "source": "https://github.com/protocolbuffers/protobuf-php/tree/v4.33.1" + "source": "https://github.com/protocolbuffers/protobuf-php/tree/v4.33.2" }, - "time": "2025-11-12T21:58:05+00:00" + "time": "2025-12-05T22:12:22+00:00" }, { "name": "league/csv", @@ -2673,16 +2673,16 @@ }, { "name": "symfony/http-client", - "version": "v7.4.0", + "version": "v7.4.1", "source": { "type": "git", "url": "https://github.com/symfony/http-client.git", - "reference": "ee5e0e0139ab506f6063a230e631bed677c650a4" + "reference": "26cc224ea7103dda90e9694d9e139a389092d007" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-client/zipball/ee5e0e0139ab506f6063a230e631bed677c650a4", - "reference": "ee5e0e0139ab506f6063a230e631bed677c650a4", + "url": "https://api.github.com/repos/symfony/http-client/zipball/26cc224ea7103dda90e9694d9e139a389092d007", + "reference": "26cc224ea7103dda90e9694d9e139a389092d007", "shasum": "" }, "require": { @@ -2750,7 +2750,7 @@ "http" ], "support": { - "source": "https://github.com/symfony/http-client/tree/v7.4.0" + "source": "https://github.com/symfony/http-client/tree/v7.4.1" }, "funding": [ { @@ -2770,7 +2770,7 @@ "type": "tidelift" } ], - "time": "2025-11-20T12:32:50+00:00" + "time": "2025-12-04T21:12:57+00:00" }, { "name": "symfony/http-client-contracts", @@ -4264,29 +4264,29 @@ }, { "name": "utopia-php/framework", - "version": "0.33.33", + "version": "0.33.34", "source": { "type": "git", "url": "https://github.com/utopia-php/http.git", - "reference": "838e3a28276e73187bc34a314f014096dc92191b" + "reference": "76def92594c32504ec80eaacdb60ff8fad73c856" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/http/zipball/838e3a28276e73187bc34a314f014096dc92191b", - "reference": "838e3a28276e73187bc34a314f014096dc92191b", + "url": "https://api.github.com/repos/utopia-php/http/zipball/76def92594c32504ec80eaacdb60ff8fad73c856", + "reference": "76def92594c32504ec80eaacdb60ff8fad73c856", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.3", "utopia-php/compression": "0.1.*", "utopia-php/telemetry": "0.1.*", "utopia-php/validators": "0.1.*" }, "require-dev": { - "laravel/pint": "^1.2", - "phpbench/phpbench": "^1.2", - "phpstan/phpstan": "^1.10", - "phpunit/phpunit": "^9.5.25" + "laravel/pint": "1.*", + "phpbench/phpbench": "1.*", + "phpstan/phpstan": "1.*", + "phpunit/phpunit": "9.*" }, "type": "library", "autoload": { @@ -4306,9 +4306,9 @@ ], "support": { "issues": "https://github.com/utopia-php/http/issues", - "source": "https://github.com/utopia-php/http/tree/0.33.33" + "source": "https://github.com/utopia-php/http/tree/0.33.34" }, - "time": "2025-11-25T10:21:13+00:00" + "time": "2025-12-08T07:55:31+00:00" }, { "name": "utopia-php/image", @@ -4513,16 +4513,16 @@ }, { "name": "utopia-php/migration", - "version": "1.3.6", + "version": "1.3.9", "source": { "type": "git", "url": "https://github.com/utopia-php/migration.git", - "reference": "4abe70cc242bbffebfa377e4126ee2a4a1c9ef7e" + "reference": "c55ec67c74663190cda10fd79297422147be7e85" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/migration/zipball/4abe70cc242bbffebfa377e4126ee2a4a1c9ef7e", - "reference": "4abe70cc242bbffebfa377e4126ee2a4a1c9ef7e", + "url": "https://api.github.com/repos/utopia-php/migration/zipball/c55ec67c74663190cda10fd79297422147be7e85", + "reference": "c55ec67c74663190cda10fd79297422147be7e85", "shasum": "" }, "require": { @@ -4562,9 +4562,9 @@ ], "support": { "issues": "https://github.com/utopia-php/migration/issues", - "source": "https://github.com/utopia-php/migration/tree/1.3.6" + "source": "https://github.com/utopia-php/migration/tree/1.3.9" }, - "time": "2025-11-25T11:36:57+00:00" + "time": "2025-12-08T08:45:09+00:00" }, { "name": "utopia-php/mongo", @@ -4679,16 +4679,16 @@ }, { "name": "utopia-php/platform", - "version": "0.7.12", + "version": "0.7.13", "source": { "type": "git", "url": "https://github.com/utopia-php/platform.git", - "reference": "04255de21db75e90b170040f4d1b457ba721e7a5" + "reference": "77a863a920122e2c6a6bc6ee5548d366a3f4c6c7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/platform/zipball/04255de21db75e90b170040f4d1b457ba721e7a5", - "reference": "04255de21db75e90b170040f4d1b457ba721e7a5", + "url": "https://api.github.com/repos/utopia-php/platform/zipball/77a863a920122e2c6a6bc6ee5548d366a3f4c6c7", + "reference": "77a863a920122e2c6a6bc6ee5548d366a3f4c6c7", "shasum": "" }, "require": { @@ -4701,6 +4701,7 @@ }, "require-dev": { "laravel/pint": "1.*", + "phpstan/phpstan": "2.*", "phpunit/phpunit": "9.*" }, "type": "library", @@ -4723,9 +4724,9 @@ ], "support": { "issues": "https://github.com/utopia-php/platform/issues", - "source": "https://github.com/utopia-php/platform/tree/0.7.12" + "source": "https://github.com/utopia-php/platform/tree/0.7.13" }, - "time": "2025-09-05T15:53:12+00:00" + "time": "2025-12-08T10:02:40+00:00" }, { "name": "utopia-php/pools", @@ -4952,16 +4953,16 @@ }, { "name": "utopia-php/storage", - "version": "0.18.14", + "version": "0.18.16", "source": { "type": "git", "url": "https://github.com/utopia-php/storage.git", - "reference": "4f14ec952c6f4006dd0613e55bbf7631814fbc00" + "reference": "0c7b8ad68de8e1eb23ccc8af9f27a30eb832930f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/storage/zipball/4f14ec952c6f4006dd0613e55bbf7631814fbc00", - "reference": "4f14ec952c6f4006dd0613e55bbf7631814fbc00", + "url": "https://api.github.com/repos/utopia-php/storage/zipball/0c7b8ad68de8e1eb23ccc8af9f27a30eb832930f", + "reference": "0c7b8ad68de8e1eb23ccc8af9f27a30eb832930f", "shasum": "" }, "require": { @@ -5004,9 +5005,9 @@ ], "support": { "issues": "https://github.com/utopia-php/storage/issues", - "source": "https://github.com/utopia-php/storage/tree/0.18.14" + "source": "https://github.com/utopia-php/storage/tree/0.18.16" }, - "time": "2025-10-07T10:21:47+00:00" + "time": "2025-12-03T02:15:45+00:00" }, { "name": "utopia-php/swoole", @@ -5960,16 +5961,16 @@ }, { "name": "nikic/php-parser", - "version": "v5.6.2", + "version": "v5.7.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "3a454ca033b9e06b63282ce19562e892747449bb" + "reference": "dca41cd15c2ac9d055ad70dbfd011130757d1f82" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/3a454ca033b9e06b63282ce19562e892747449bb", - "reference": "3a454ca033b9e06b63282ce19562e892747449bb", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/dca41cd15c2ac9d055ad70dbfd011130757d1f82", + "reference": "dca41cd15c2ac9d055ad70dbfd011130757d1f82", "shasum": "" }, "require": { @@ -6012,9 +6013,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v5.6.2" + "source": "https://github.com/nikic/PHP-Parser/tree/v5.7.0" }, - "time": "2025-10-21T19:32:17+00:00" + "time": "2025-12-06T11:56:16+00:00" }, { "name": "phar-io/manifest", @@ -6663,16 +6664,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.6.29", + "version": "9.6.31", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "9ecfec57835a5581bc888ea7e13b51eb55ab9dd3" + "reference": "945d0b7f346a084ce5549e95289962972c4272e5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/9ecfec57835a5581bc888ea7e13b51eb55ab9dd3", - "reference": "9ecfec57835a5581bc888ea7e13b51eb55ab9dd3", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/945d0b7f346a084ce5549e95289962972c4272e5", + "reference": "945d0b7f346a084ce5549e95289962972c4272e5", "shasum": "" }, "require": { @@ -6746,7 +6747,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.29" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.31" }, "funding": [ { @@ -6770,7 +6771,7 @@ "type": "tidelift" } ], - "time": "2025-09-24T06:29:11+00:00" + "time": "2025-12-06T07:45:52+00:00" }, { "name": "psr/cache", @@ -7930,16 +7931,16 @@ }, { "name": "symfony/console", - "version": "v8.0.0", + "version": "v8.0.1", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "307d3cf852f5ead3618ac60ecbedbdd512c348b1" + "reference": "fcb73f69d655b48fcb894a262f074218df08bd58" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/307d3cf852f5ead3618ac60ecbedbdd512c348b1", - "reference": "307d3cf852f5ead3618ac60ecbedbdd512c348b1", + "url": "https://api.github.com/repos/symfony/console/zipball/fcb73f69d655b48fcb894a262f074218df08bd58", + "reference": "fcb73f69d655b48fcb894a262f074218df08bd58", "shasum": "" }, "require": { @@ -7996,7 +7997,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v8.0.0" + "source": "https://github.com/symfony/console/tree/v8.0.1" }, "funding": [ { @@ -8016,20 +8017,20 @@ "type": "tidelift" } ], - "time": "2025-11-21T13:19:49+00:00" + "time": "2025-12-05T15:25:33+00:00" }, { "name": "symfony/filesystem", - "version": "v8.0.0", + "version": "v8.0.1", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "7fc96ae83372620eaba3826874f46e26295768ca" + "reference": "d937d400b980523dc9ee946bb69972b5e619058d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/7fc96ae83372620eaba3826874f46e26295768ca", - "reference": "7fc96ae83372620eaba3826874f46e26295768ca", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/d937d400b980523dc9ee946bb69972b5e619058d", + "reference": "d937d400b980523dc9ee946bb69972b5e619058d", "shasum": "" }, "require": { @@ -8066,7 +8067,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v8.0.0" + "source": "https://github.com/symfony/filesystem/tree/v8.0.1" }, "funding": [ { @@ -8086,7 +8087,7 @@ "type": "tidelift" } ], - "time": "2025-11-05T14:36:47+00:00" + "time": "2025-12-01T09:13:36+00:00" }, { "name": "symfony/finder", @@ -8624,16 +8625,16 @@ }, { "name": "symfony/string", - "version": "v8.0.0", + "version": "v8.0.1", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "f929eccf09531078c243df72398560e32fa4cf4f" + "reference": "ba65a969ac918ce0cc3edfac6cdde847eba231dc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/f929eccf09531078c243df72398560e32fa4cf4f", - "reference": "f929eccf09531078c243df72398560e32fa4cf4f", + "url": "https://api.github.com/repos/symfony/string/zipball/ba65a969ac918ce0cc3edfac6cdde847eba231dc", + "reference": "ba65a969ac918ce0cc3edfac6cdde847eba231dc", "shasum": "" }, "require": { @@ -8690,7 +8691,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v8.0.0" + "source": "https://github.com/symfony/string/tree/v8.0.1" }, "funding": [ { @@ -8710,7 +8711,7 @@ "type": "tidelift" } ], - "time": "2025-09-11T14:37:55+00:00" + "time": "2025-12-01T09:13:36+00:00" }, { "name": "textalk/websocket", diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Create.php index 1d3bde7987..812bae16e2 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Create.php @@ -170,9 +170,7 @@ class Create extends Action if ($attributeArray === true) { // Because of a bug in MySQL, we cannot create indexes on array attributes for now, otherwise queries break. - throw new Exception(Exception::GENERAL_SERVER_ERROR, 'Creating indexes on array values is not currently supported.'); - //$lengths[$i] = Database::MAX_ARRAY_INDEX_LENGTH; - //$orders[$i] = null; + throw new Exception(Exception::INDEX_INVALID, 'Creating indexes on array attributes is not currently supported.'); } } diff --git a/tests/e2e/Services/Databases/Legacy/DatabasesBase.php b/tests/e2e/Services/Databases/Legacy/DatabasesBase.php index 409668dc46..12981ff262 100644 --- a/tests/e2e/Services/Databases/Legacy/DatabasesBase.php +++ b/tests/e2e/Services/Databases/Legacy/DatabasesBase.php @@ -1352,7 +1352,7 @@ trait DatabasesBase ]); $this->assertEquals(400, $fulltextArray['headers']['status-code']); - $this->assertEquals('"Fulltext" index is forbidden on array attributes', $fulltextArray['body']['message']); + $this->assertEquals('Creating indexes on array attributes is not currently supported.', $fulltextArray['body']['message']); $actorsArray = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', @@ -1364,7 +1364,8 @@ trait DatabasesBase 'attributes' => ['actors'], ]); - $this->assertEquals(202, $actorsArray['headers']['status-code']); + $this->assertEquals(400, $actorsArray['headers']['status-code']); + $this->assertEquals('Creating indexes on array attributes is not currently supported.', $actorsArray['body']['message']); $twoLevelsArray = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', @@ -1377,7 +1378,8 @@ trait DatabasesBase 'orders' => ['DESC', 'DESC'], ]); - $this->assertEquals(202, $twoLevelsArray['headers']['status-code']); + $this->assertEquals(400, $twoLevelsArray['headers']['status-code']); + $this->assertEquals('Creating indexes on array attributes is not currently supported.', $twoLevelsArray['body']['message']); $unknown = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', @@ -1403,7 +1405,8 @@ trait DatabasesBase 'orders' => ['DESC'], // Check order is removed in API ]); - $this->assertEquals(202, $index1['headers']['status-code']); + $this->assertEquals(400, $index1['headers']['status-code']); + $this->assertEquals('Creating indexes on array attributes is not currently supported.', $index1['body']['message']); $index2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', @@ -1415,7 +1418,8 @@ trait DatabasesBase 'attributes' => ['integers'], // array attribute ]); - $this->assertEquals(202, $index2['headers']['status-code']); + $this->assertEquals(400, $index2['headers']['status-code']); + $this->assertEquals('Creating indexes on array attributes is not currently supported.', $index2['body']['message']); /** * Create Indexes by worker @@ -1429,7 +1433,7 @@ trait DatabasesBase ]), []); $this->assertIsArray($movies['body']['indexes']); - $this->assertCount(8, $movies['body']['indexes']); + $this->assertCount(4, $movies['body']['indexes']); $this->assertEquals($titleIndex['body']['key'], $movies['body']['indexes'][0]['key']); $this->assertEquals($releaseYearIndex['body']['key'], $movies['body']['indexes'][1]['key']); $this->assertEquals($releaseWithDate1['body']['key'], $movies['body']['indexes'][2]['key']); @@ -1483,8 +1487,7 @@ trait DatabasesBase $this->assertEquals('lengthTestIndex', $index['body']['key']); $this->assertEquals([128, 200], $index['body']['lengths']); - // Test case for lengths array overriding - // set a length for an array attribute, it should get overriden with Database::MAX_ARRAY_INDEX_LENGTH + // Test case for array attribute index (should be blocked) $create = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/collections/{$collectionId}/indexes", [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -1495,14 +1498,8 @@ trait DatabasesBase 'attributes' => ['actors'], 'lengths' => [120] ]); - $this->assertEquals(202, $create['headers']['status-code']); - - $index = $this->client->call(Client::METHOD_GET, "/databases/{$databaseId}/collections/{$collectionId}/indexes/lengthOverrideTestIndex", [ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - 'x-appwrite-key' => $this->getProject()['apiKey'] - ]); - $this->assertEquals([Database::MAX_ARRAY_INDEX_LENGTH], $index['body']['lengths']); + $this->assertEquals(400, $create['headers']['status-code']); + $this->assertEquals('Creating indexes on array attributes is not currently supported.', $create['body']['message']); // Test case for count of lengths greater than attributes (should throw 400) $create = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/collections/{$collectionId}/indexes", [ diff --git a/tests/e2e/Services/Databases/TablesDB/DatabasesBase.php b/tests/e2e/Services/Databases/TablesDB/DatabasesBase.php index f7739567c8..f2df01ebb0 100644 --- a/tests/e2e/Services/Databases/TablesDB/DatabasesBase.php +++ b/tests/e2e/Services/Databases/TablesDB/DatabasesBase.php @@ -1334,7 +1334,7 @@ trait DatabasesBase ]); $this->assertEquals(400, $fulltextArray['headers']['status-code']); - $this->assertEquals('"Fulltext" index is forbidden on array attributes', $fulltextArray['body']['message']); + $this->assertEquals('Creating indexes on array attributes is not currently supported.', $fulltextArray['body']['message']); $actorsArray = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', @@ -1346,7 +1346,8 @@ trait DatabasesBase 'columns' => ['actors'], ]); - $this->assertEquals(202, $actorsArray['headers']['status-code']); + $this->assertEquals(400, $actorsArray['headers']['status-code']); + $this->assertEquals('Creating indexes on array attributes is not currently supported.', $actorsArray['body']['message']); $twoLevelsArray = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', @@ -1359,7 +1360,8 @@ trait DatabasesBase 'orders' => ['DESC', 'DESC'], ]); - $this->assertEquals(202, $twoLevelsArray['headers']['status-code']); + $this->assertEquals(400, $twoLevelsArray['headers']['status-code']); + $this->assertEquals('Creating indexes on array attributes is not currently supported.', $twoLevelsArray['body']['message']); $unknown = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', @@ -1385,7 +1387,8 @@ trait DatabasesBase 'orders' => ['DESC'], // Check order is removed in API ]); - $this->assertEquals(202, $index1['headers']['status-code']); + $this->assertEquals(400, $index1['headers']['status-code']); + $this->assertEquals('Creating indexes on array attributes is not currently supported.', $index1['body']['message']); $index2 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', @@ -1397,7 +1400,8 @@ trait DatabasesBase 'columns' => ['integers'], // array column ]); - $this->assertEquals(202, $index2['headers']['status-code']); + $this->assertEquals(400, $index2['headers']['status-code']); + $this->assertEquals('Creating indexes on array attributes is not currently supported.', $index2['body']['message']); /** * Create Indexes by worker @@ -1411,7 +1415,7 @@ trait DatabasesBase ]), []); $this->assertIsArray($movies['body']['indexes']); - $this->assertCount(8, $movies['body']['indexes']); + $this->assertCount(4, $movies['body']['indexes']); $this->assertEquals($titleIndex['body']['key'], $movies['body']['indexes'][0]['key']); $this->assertEquals($releaseYearIndex['body']['key'], $movies['body']['indexes'][1]['key']); $this->assertEquals($releaseWithDate1['body']['key'], $movies['body']['indexes'][2]['key']);